Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add is_organization_private to automatic problem rescore check #1643

Merged
merged 1 commit into from
Apr 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion judge/admin/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ def get_form(self, *args, **kwargs):

def save_model(self, request, obj, form, change):
super(ProblemAdmin, self).save_model(request, obj, form, change)
if form.changed_data and any(f in form.changed_data for f in ('is_public', 'points', 'partial')):
if (
form.changed_data and
any(f in form.changed_data for f in ('is_public', 'is_organization_private', 'points', 'partial'))
):
self._rescore(request, obj.id)

def construct_change_message(self, request, form, *args, **kwargs):
Expand Down