The SIO2 project
  1. The SIO2 project
  2. SIO-2057

Creating a team in admin mode is causing an error if we add membership at the same time

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor 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.

        Activity

          People

          • Assignee:
            Szymon AcedaƄski
            Reporter:
            Bartosz Kostka
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: