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, 'category': solve.chal.category,
'time': unix_time(solve.date) 'time': unix_time(solve.date)
}) })
for award in awards: if awards:
json['solves'].append({ for award in awards:
'chal': award.name, json['solves'].append({
'chalid': None, 'chal': award.name,
'team': award.teamid, 'chalid': None,
'value': award.value, 'team': award.teamid,
'category': award.category, 'value': award.value,
'time': unix_time(award.date) 'category': award.category,
}) 'time': unix_time(award.date)
})
json['solves'].sort(key=lambda k: k['time']) json['solves'].sort(key=lambda k: k['time'])
return jsonify(json) return jsonify(json)