Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
3412a64e
Commit
3412a64e
authored
Aug 24, 2016
by
Luuk Scholten
Browse files
Exclude users without membership from active member manager
parent
747ab832
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/members/models.py
View file @
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
())))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment