try to fix db 500 errors on wpd
parent
4ef9a7b58c
commit
e5b2675f0d
|
@ -354,7 +354,7 @@ def gumroad(v):
|
|||
procoins = procoins_li[tier] - procoins_li[v.patron]
|
||||
if procoins < 0: return {"error": f"{patron} rewards already claimed"}, 400
|
||||
|
||||
existing = g.db.query(User.id).filter(User.email == v.email, User.is_activated == True, User.patron >= tier).one_or_none()
|
||||
existing = g.db.query(User.id).filter(User.email == v.email, User.is_activated == True, User.patron >= tier).first()
|
||||
if existing: return {"error": f"{patron} rewards already claimed on another account"}, 400
|
||||
|
||||
v.patron = tier
|
||||
|
|
|
@ -159,7 +159,7 @@ def vote_comment(comment_id, new, v):
|
|||
|
||||
coin_mult = 1
|
||||
|
||||
g.db.flush()
|
||||
g.db.commit()
|
||||
existing = g.db.query(CommentVote).filter_by(user_id=v.id, comment_id=comment.id).one_or_none()
|
||||
|
||||
if DOUBLE_XP_ENABLED > 0:
|
||||
|
|
Loading…
Reference in New Issue