forked from rDrama/rDrama
fdsfds
parent
fd34fe8217
commit
665866ba6b
|
@ -400,10 +400,7 @@ def badge_grant_post(v):
|
||||||
"""
|
"""
|
||||||
send_notification(NOTIFICATIONS_ACCOUNT, user, text)
|
send_notification(NOTIFICATIONS_ACCOUNT, user, text)
|
||||||
|
|
||||||
if badge_id == 16 and user.has_badge(17):
|
if badge_id in [21,22,23,24,25,28]:
|
||||||
g.db.query(Badge).options(lazyload('*')).filter_by(badge_id=17, user_id=user.id).delete()
|
|
||||||
|
|
||||||
elif badge_id in [21,22,23,24,25,28]:
|
|
||||||
user.patron = int(str(badge_id)[-1])
|
user.patron = int(str(badge_id)[-1])
|
||||||
|
|
||||||
grant_awards = {}
|
grant_awards = {}
|
||||||
|
|
|
@ -328,9 +328,6 @@ def sign_up_post(v):
|
||||||
if not ref_user.has_badge(badge.id):
|
if not ref_user.has_badge(badge.id):
|
||||||
new_badge = Badge(user_id=ref_user.id, badge_id=badge.id)
|
new_badge = Badge(user_id=ref_user.id, badge_id=badge.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
else:
|
|
||||||
bad_badge = ref_user.has_badge(badge.id)
|
|
||||||
if bad_badge: g.db.delete(bad_badge)
|
|
||||||
|
|
||||||
g.db.add(ref_user)
|
g.db.add(ref_user)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue