fds
This commit is contained in:
parent
78db71d97c
commit
6d30e59dad
4 changed files with 30 additions and 3 deletions
|
@ -418,6 +418,7 @@ def badge_grant_post(v):
|
|||
return redirect("/admin/badge_grant")
|
||||
|
||||
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\n\n{new_badge.name}")
|
||||
|
||||
desc = request.values.get("description")
|
||||
if desc: new_badge.description = desc
|
||||
|
@ -684,6 +685,8 @@ def agendaposter(user_id, v):
|
|||
if not user.has_badge(26):
|
||||
badge = Badge(user_id=user.id, badge_id=26)
|
||||
g.db.add(badge)
|
||||
send_notification(user.id, f"@AutoJanny has given you the following profile badge:\n\n\n\n{badge.name}")
|
||||
|
||||
else:
|
||||
badge = user.has_badge(26)
|
||||
if badge: g.db.delete(badge)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue