From b702e27446d7db06fe9a709f24c1ec1aa32ddddd Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 1 Feb 2021 04:12:12 +0100 Subject: [PATCH] need_membership is useless if an article provides a membership --- portail/forms.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/portail/forms.py b/portail/forms.py index c7f11ba3..4191eaec 100644 --- a/portail/forms.py +++ b/portail/forms.py @@ -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), )