Skip to content

Commit 263ac06

Browse files
committed
Web: Use same order for services in scoreboard.json and status.json
This way teams can scrape them and correlate the output from both.
1 parent e3d04f3 commit 263ac06

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ctf_gameserver/web/scoring/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
def scoreboard(request):
1919

2020
return render(request, 'scoreboard.html', {
21-
'services': models.Service.objects.all()
21+
'services': models.Service.objects.all().order_by('name')
2222
})
2323

2424

@@ -37,7 +37,7 @@ def scoreboard_json(_):
3737
scores = calculations.scores(['team', 'team__user', 'service'],
3838
['team__image', 'team__user__username', 'service__name'])
3939
statuses = calculations.team_statuses(to_tick, to_tick, only_team_fields=['user_id'])
40-
services = models.Service.objects.all()
40+
services = models.Service.objects.all().order_by('name')
4141

4242
response = {
4343
'tick': to_tick,

0 commit comments

Comments
 (0)