same as last commit

master
Aevann 2023-06-22 19:19:05 +03:00
parent 683c640e32
commit 0106d3d69f
1 changed files with 5 additions and 8 deletions

View File

@ -159,14 +159,11 @@ def approve_emoji(v, name):
badge_grant(badge_id=16, user=author)
else:
badge_grant(badge_id=17, user=author)
if emoji.name.startswith("marseycapy"):
all_by_author = all_by_author.filter(Emoji.name.like("marseycapy%")).count()
if all_by_author >= 10:
badge_grant(badge_id=115, user=author)
else:
badge_grant(badge_id=114, user=author)
elif emoji.kind == "Capy":
all_by_author = g.db.query(Emoji).filter_by(kind="Capy", author_id=author.id).count()
if all_by_author >= 10:
badge_grant(badge_id=115, user=author)
badge_grant(badge_id=114, user=author)
elif emoji.kind == "Wolf":
all_by_author = g.db.query(Emoji).filter_by(kind="Wolf", author_id=author.id).count()
if all_by_author >= 10: