membershipworks: Require "Members" or "CMS Staff" folder for is_active check

This commit is contained in:
Adam Goldsmith 2023-01-03 16:37:46 -05:00
parent a53c9409bb
commit 60bbe18322

View File

@ -138,7 +138,11 @@ class Member(models.Model):
@classmethod
def with_is_active(cls):
return cls.objects.annotate(
is_active=~(
is_active=(
Q(flags__name="Members", flags__type="folder")
| Q(flags__name="CMS Staff", flags__type="folder")
)
& ~(
Q(flags__name="Account On Hold", flags__type="label")
| Q(flags__name="CMS Membership on hold", flags__type="level")
| Q(flags__name="Former Members", flags__type="folder")