Commit 3412a64e authored by Luuk Scholten's avatar Luuk Scholten
Browse files

Exclude users without membership from active member manager

parent 747ab832
......@@ -15,6 +15,7 @@ class ActiveMemberManager(models.Manager):
"""Get all active members"""
def get_queryset(self):
return (super().get_queryset()
.exclude(user__membership=None)
.filter(Q(user__membership__until__isnull=True) |
Q(user__membership__until__gt=timezone.now().date())))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment