From 2f48dc53e38478439f9d5322436f8c3fd255bf1f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 25 Jan 2022 01:49:00 +0200 Subject: [PATCH] cx --- files/routes/admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index ef8279d6b..0fc3e67da 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -442,6 +442,7 @@ def badge_grant_post(v): g.db.add(new_badge) if v.id != user.id: + g.db.flush() text = f"@{v.username} has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}" send_notification(user.id, text) @@ -718,6 +719,7 @@ def agendaposter(user_id, v): if not user.has_badge(26): badge = Badge(user_id=user.id, badge_id=26) g.db.add(badge) + g.db.flush() send_notification(user.id, f"@AutoJanny has given you the following profile badge:\n\n![]({badge.path})\n\n{badge.name}") else: