From cfd95232de9317f35a3439f68c9e2f038a606536 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 6 Jan 2022 17:07:56 +0200 Subject: [PATCH] fds --- files/routes/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/users.py b/files/routes/users.py index 6d4dbb2a5..aa8fcfaa9 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -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