mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 11:53:12 +00:00
Fix query test for set_active function
This commit is contained in:
parent
906f9f0a3b
commit
8190101c0a
1 changed files with 3 additions and 3 deletions
|
@ -931,9 +931,9 @@ class User(
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if self.state == self.STATE_NOT_YET_ACTIVE:
|
if self.state == self.STATE_NOT_YET_ACTIVE:
|
||||||
if self.facture_set.filter(valid=True).filter(
|
if not self.facture_set.filter(valid=True).filter(
|
||||||
~(Q(vente__duration_membership__isnull=True) | Q(vente__duration_membership=0)))\
|
(Q(vente__duration_membership__isnull=True) | Q(vente__duration_membership=0))\
|
||||||
.filter(~(Q(vente__duration_days_membership__isnull=True) | Q(vente__duration_days_membership=0))
|
).filter(Q(vente__duration_days_membership__isnull=True) | Q(vente__duration_days_membership=0)
|
||||||
).exists() or OptionalUser.get_cached_value("all_users_active"):
|
).exists() or OptionalUser.get_cached_value("all_users_active"):
|
||||||
self.state = self.STATE_ACTIVE
|
self.state = self.STATE_ACTIVE
|
||||||
self.save()
|
self.save()
|
||||||
|
|
Loading…
Reference in a new issue