mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
Typo causing people at the end of their organic lists to get a 500
This commit is contained in:
@@ -193,9 +193,9 @@ organic_pos_key = 'organic_pos'
|
||||
def organic_pos():
|
||||
"organic_pos() -> (calc_date = str(), pos = int())"
|
||||
try:
|
||||
d,p = get_redditfirst(organic_pos_key, (None,0))
|
||||
d,p = get_redditfirst(organic_pos_key, ('',0))
|
||||
except ValueError:
|
||||
d,p = (None,0)
|
||||
d,p = ('',0)
|
||||
return d,p
|
||||
|
||||
def set_organic_pos(key,pos):
|
||||
|
||||
@@ -168,7 +168,7 @@ def organic_links(user):
|
||||
|
||||
cookie_key, pos = organic_pos()
|
||||
# pos will be 0 if it wasn't specified
|
||||
if links and (cookie_key == cached_key):
|
||||
if links and pos != 0:
|
||||
# make sure that we're not running off the end of the list
|
||||
pos = pos % len(links)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user