def is_elected(self, user):
        return self.elected.filter(pk=user.pk).exists()
Returns True if the user is elected for this assignment.
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/assignments/models.py/Assignment.is_elected