This commit is contained in:
Aevann1 2021-10-05 21:15:48 +02:00
parent 09a57dad7c
commit 61fb596548
4 changed files with 14 additions and 16 deletions

View file

@ -10,7 +10,7 @@ def api_flag_post(pid, v):
post = get_post(pid)
if v:
if v and not v.shadowbanned:
existing = g.db.query(Flag).options(lazyload('*')).filter_by(user_id=v.id, post_id=post.id).first()
if existing: return "", 409
@ -41,7 +41,7 @@ def api_flag_comment(cid, v):
comment = get_comment(cid)
if v:
if v and not v.shadowbanned:
existing = g.db.query(CommentFlag).options(lazyload('*')).filter_by(
user_id=v.id, comment_id=comment.id).first()