new awards query

master
atrc445 2021-09-16 21:37:39 +02:00
parent 9a6fc86369
commit e8afa57299
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ def get_awards(v):
user_awards = v.awards
for val in return_value:
val['owned'] = len([x for x in user_awards if x.kind == val['kind'] and not x.given])
val['owned'] = user_awards.filter_by(kind=val['kind'], submission_id=None, comment_id=None).count()
return jsonify(return_value)