membershipworks: Correctly invert is_active check on Member
This commit is contained in:
parent
a9dcda9508
commit
a53c9409bb
@ -138,10 +138,12 @@ class Member(models.Model):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def with_is_active(cls):
|
def with_is_active(cls):
|
||||||
return cls.objects.annotate(
|
return cls.objects.annotate(
|
||||||
is_active=Q(flags__name="Account On Hold", flags__type="label")
|
is_active=~(
|
||||||
|
Q(flags__name="Account On Hold", flags__type="label")
|
||||||
| Q(flags__name="CMS Membership on hold", flags__type="level")
|
| Q(flags__name="CMS Membership on hold", flags__type="level")
|
||||||
| Q(flags__name="Former Members", flags__type="folder")
|
| Q(flags__name="Former Members", flags__type="folder")
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class MemberFlag(models.Model):
|
class MemberFlag(models.Model):
|
||||||
|
Loading…
Reference in New Issue
Block a user