Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: Current Version
-
Fix Version/s: None
-
Component/s: OIOIOI
-
Labels:None
Description
Just try to add a new team and add some members at the same time.
The following error should occur:
File "/home/rno/sio2/venv/local/lib/python2.7/site-packages/django/forms/models.py", line 411, in validate_unique
self.instance.validate_unique(exclude=exclude)
File "/home/rno/sio2/oioioi/oioioi/teams/models.py", line 45, in validate_unique
team__contest=self.team.contest) \
File "/home/rno/sio2/venv/local/lib/python2.7/site-packages/django/db/models/fields/related_descriptors.py", line 179, in __get__
"%s has no %s." % (self.field.model.__name__, self.field.name)
RelatedObjectDoesNotExist: Team has no contest.
When we first add a team and then try to add its members, it works.
The following error should occur:
File "/home/rno/sio2/venv/local/lib/python2.7/site-packages/django/forms/models.py", line 411, in validate_unique
self.instance.validate_unique(exclude=exclude)
File "/home/rno/sio2/oioioi/oioioi/teams/models.py", line 45, in validate_unique
team__contest=self.team.contest) \
File "/home/rno/sio2/venv/local/lib/python2.7/site-packages/django/db/models/fields/related_descriptors.py", line 179, in __get__
"%s has no %s." % (self.field.model.__name__, self.field.name)
RelatedObjectDoesNotExist: Team has no contest.
When we first add a team and then try to add its members, it works.