8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 03:13:12 +00:00

need_membership is useless if an article provides a membership

This commit is contained in:
Yohann D'ANELLO 2021-02-01 04:12:12 +01:00
parent bc62fc7e20
commit b702e27446
No known key found for this signature in database
GPG key ID: 3A75C55819C8CF85

View file

@ -61,6 +61,8 @@ class MembershipForm(forms.Form):
article = forms.ModelChoiceField(
Article.objects.filter(Q(duration_connection__gt=0) | Q(duration_days_connection__gt=0),
available_for_everyone=True,
need_membership=False),
Q(need_membership=False)
| Q(duration_membership__gt=0)
| Q(duration_days_membership__gt=0),
available_for_everyone=True),
)