Skip to content

Commit

Permalink
Correctly set contest.is_organization_private when using classes
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 authored and Xyene committed Dec 16, 2022
1 parent 3373d6e commit e309931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions judge/admin/contest.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ def save_model(self, request, obj, form, change):
if form.changed_data:
if 'private_contestants' in form.changed_data:
obj.is_private = bool(form.cleaned_data['private_contestants'])
if 'organizations' in form.changed_data:
obj.is_organization_private = bool(form.cleaned_data['organizations'])
if 'organizations' in form.changed_data or 'classes' in form.changed_data:
obj.is_organization_private = bool(form.cleaned_data['organizations'] or form.cleaned_data['classes'])
if 'join_organizations' in form.cleaned_data:
obj.limit_join_organizations = bool(form.cleaned_data['join_organizations'])

Expand Down

0 comments on commit e309931

Please sign in to comment.