This commit is contained in:
Aevann1 2022-01-06 17:07:56 +02:00
parent dad6b7d7f5
commit a297930dc7

View file

@ -419,7 +419,7 @@ def message2(v, username):
existing = g.db.query(Comment.id).filter(Comment.author_id == v.id,
Comment.sentto == user.id,
Comment.body_html == text_html,
).one_or_none()
).first()
if existing: return redirect('/notifications?messages=true')
new_comment = Comment(author_id=v.id,
@ -487,7 +487,7 @@ def message3(v, username):
existing = g.db.query(Comment.id).filter(Comment.author_id == v.id,
Comment.sentto == user.id,
Comment.body_html == text_html,
).one_or_none()
).first()
if existing: return {"error": "Message already exists."}, 403