I think this line needs three DB queries. It would be better to get the active slide (one query) and test it manually.
```python
active_slide = get_active_slide()
if (type(active_slide) is Assignment and active_slide.pk == self.pk) or
        (type(active_slide) is AssignmentPoll and active_slide.assignment_id = self.pk):
    update_projector()
```