Users with no awards

This commit is contained in:
CodeKevin
2016-05-23 20:20:39 -04:00
parent 9171b67235
commit d04fd0f5bf

View File

@@ -90,15 +90,16 @@ def solves(teamid=None):
'category': solve.chal.category,
'time': unix_time(solve.date)
})
for award in awards:
json['solves'].append({
'chal': award.name,
'chalid': None,
'team': award.teamid,
'value': award.value,
'category': award.category,
'time': unix_time(award.date)
})
if awards:
for award in awards:
json['solves'].append({
'chal': award.name,
'chalid': None,
'team': award.teamid,
'value': award.value,
'category': award.category,
'time': unix_time(award.date)
})
json['solves'].sort(key=lambda k: k['time'])
return jsonify(json)