forked from rDrama/rDrama
1
0
Fork 0

minor error fix

master
Aevann 2023-08-21 21:28:48 +03:00
parent e87de9eae1
commit b992c97b64
1 changed files with 1 additions and 0 deletions

View File

@ -4,6 +4,7 @@ from files.classes.badges import Badge
from files.helpers.alerts import send_repeatable_notification
def badge_grant(user, badge_id, notify=True, check_if_exists=True):
g.db.flush()
existing = g.db.query(Badge).filter_by(user_id=user.id, badge_id=badge_id).one_or_none()
if existing: return