Skip to content

Commit

Permalink
Merge pull request #308 from fmkra/issue/207
Browse files Browse the repository at this point in the history
Issue/207
  • Loading branch information
fmkra authored Jan 17, 2024
2 parents 8d8a763 + 571944a commit a0b83e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions oioioi/oi/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class SchoolAdmin(admin.ModelAdmin):
'delete_selected',
)

def get_list_display(self, request):
if request.contest is None:
return tuple(ld for ld in self.list_display if ld != 'participants_link')
return self.list_display

def participants_link(self, instance):
return make_html_link(instance.get_participants_url(), _("Participants"))

Expand Down

0 comments on commit a0b83e3

Please sign in to comment.