Skip to content

Commit

Permalink
Correctly handle organizations that don't require classes
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 committed Jan 30, 2022
1 parent 74cbf07 commit 0516433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/models/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class OrganizationRequest(models.Model):
def clean(self):
if self.organization.class_required and self.request_class is None:
raise ValidationError('Organization requires a class to be specified')
if self.organization_id != self.request_class.organization_id:
if self.request_class and self.organization_id != self.request_class.organization_id:
raise ValidationError('Class must be part of the organization')

class Meta:
Expand Down

0 comments on commit 0516433

Please sign in to comment.