You could replace this with something like ``for event in events.distinct()``.