1
0
Fork 0

Order by id instead of time because timestamps may be nonmonotonic.

Probably a result of moderator actions, I found that items with a lower
id could have a higher timestamp, enough to offset it by 2,000 ids.
master
voussoir 2020-10-27 22:27:10 -07:00
parent eff67f845d
commit e0862f9e44
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ def select_item(id):
return item
def select_latest_id():
cur = sql.execute('SELECT id FROM items ORDER BY time DESC, id ASC LIMIT 1')
cur = sql.execute('SELECT id FROM items ORDER BY id DESC LIMIT 1')
row = cur.fetchone()
if row is None:
return None