def set_elected(self, user):
        related_user, __ = self.assignment_related_users.update_or_create(
            user=user,
            defaults={'elected': True})
Makes user an elected user for this assignment.
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/assignments/models.py/Assignment.set_elected