Skip to content

Commit 0367bea

Browse files
RishabhJain2018deshraj
authored andcommitted
Challenges: Fix bug in LeaderboardData Admin (Cloud-CV#2031)
1 parent db17292 commit 0367bea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/challenges/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ class LeaderboardAdmin(ImportExportTimeStampedAdmin):
7171

7272
@admin.register(LeaderboardData)
7373
class LeaderboardDataAdmin(ImportExportTimeStampedAdmin):
74-
list_display = ('get_challenge', 'challenge_phase_split', 'submission', 'leaderboard', 'result',)
74+
list_display = ('id', 'get_challenge', 'challenge_phase_split', 'submission', 'leaderboard', 'result',)
7575
list_filter = ('challenge_phase_split', 'created_at', 'modified_at',)
7676
search_fields = ('challenge_phase_split__challenge_phase__name',
7777
'submission__participant_team__team_name', 'leaderboard__schema', 'result',)
7878

7979
def get_challenge(self, obj):
8080
"""Returns challenge name corresponding to leaderboard data entry"""
81-
return obj.challenge_phase.challenge
81+
return obj.challenge_phase_split.challenge_phase.challenge
8282
get_challenge.short_description = 'Challenge'
8383
get_challenge.admin_order_field = 'challenge_phase__challenge'
8484

0 commit comments

Comments
 (0)