Skip to content

Commit

Permalink
fix bug contest_object is none
Browse files Browse the repository at this point in the history
  • Loading branch information
leduythuccs committed Sep 19, 2024
1 parent 772836a commit 5f03135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/models/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def update_credit(self, consumed_credit):
except AttributeError:
pass

if contest_object.is_organization_private:
if contest_object is not None and contest_object.is_organization_private:
organizations = contest_object.organizations.all()

for organization in organizations:
Expand Down

0 comments on commit 5f03135

Please sign in to comment.