def set_phase(self, phase):
        if phase not in dict(self.PHASES):
            raise ValueError("Invalid phase %s" % phase)

        self.phase = phase
Sets the phase attribute of the assignment.
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/assignments/models.py/Assignment.set_phase