Commit 98fb212a authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'bugfix/active-members-manager-returns-members-without-membership' into 'master'

Exclude users without membership from active member manager



See merge request !52
parents 4f0bf9e9 3412a64e
......@@ -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