remotes/1693045480750635534/spooky-22
Aevann1 2021-12-28 16:01:30 +02:00
parent 5eec6d293a
commit aeb1492960
1 changed files with 1 additions and 3 deletions

View File

@ -411,9 +411,7 @@ def badge_grant_post(v):
try: badge_id = int(request.values.get("badge_id"))
except: abort(400)
existing = user.has_badge(badge_id)
if existing:
return redirect("/badge_grant?error=User already has that badge!")
if user.has_badge(badge_id): return redirect("/badge_grant?error=User already has that badge!")
new_badge = Badge(badge_id=badge_id, user_id=user.id)
send_notification(user.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")