fdsfs
This commit is contained in:
parent
dcda9f594b
commit
edc913832e
2 changed files with 25 additions and 134 deletions
|
@ -555,11 +555,25 @@ def admin_userawards_post(v):
|
|||
g.db.add(award)
|
||||
|
||||
text = "You were given the following awards:\n\n"
|
||||
|
||||
for key, value in notify_awards.items(): text += f" - **{value}** {AWARDS[key]['title']} {'Awards' if value != 1 else 'Award'}\n"
|
||||
|
||||
for key, value in notify_awards.items():
|
||||
text += f" - **{value}** {AWARDS[key]['title']} {'Awards' if value != 1 else 'Award'}\n"
|
||||
|
||||
send_repeatable_notification(u.id, text)
|
||||
|
||||
note = ""
|
||||
|
||||
for key, value in notify_awards.items():
|
||||
note += f"{value} {AWARDS[key]['title']} {'Awards' if value != 1 else 'Award'}, "
|
||||
|
||||
ma=ModAction(
|
||||
kind="grant_awards",
|
||||
user_id=v.id,
|
||||
target_user_id=u.id,
|
||||
_note=note
|
||||
)
|
||||
g.db.add(ma)
|
||||
|
||||
g.db.commit()
|
||||
|
||||
if v.admin_level != 3: return render_template(f"{template}admin/awards.html", awards=list(AWARDS3.values()), v=v)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue