fsd
This commit is contained in:
parent
123cc81604
commit
d456aaa0c7
18 changed files with 119 additions and 119 deletions
|
@ -98,7 +98,7 @@ def cached_chart(days):
|
|||
today_cutoff = calendar.timegm(midnight_this_morning)
|
||||
|
||||
if not days:
|
||||
firstsignup = g.db.query(User.created_utc).filter(User.created_utc != 0).order_by(User.created_utc).first()[0] - 86400
|
||||
firstsignup = g.db.query(User.created_utc).filter(User.created_utc != 0).order_by(User.created_utc).one_or_none()[0] - 86400
|
||||
nowstamp = int(time.time())
|
||||
days = int((nowstamp - firstsignup) / 86400)
|
||||
|
||||
|
@ -224,7 +224,7 @@ def log_item(id, v):
|
|||
try: id = int(id, 36)
|
||||
except: abort(404)
|
||||
|
||||
action=g.db.query(ModAction).filter_by(id=id).first()
|
||||
action=g.db.query(ModAction).filter_by(id=id).one_or_none()
|
||||
|
||||
if not action:
|
||||
abort(404)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue