From 70a5996f5d47b1091906e7e8397cf1ba94573c0c Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Fri, 28 Dec 2018 23:27:56 +0100 Subject: [PATCH] Fix available articles --- cotisations/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cotisations/models.py b/cotisations/models.py index 6dd63b6f..f8e53b50 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -624,7 +624,7 @@ class Article(RevMixin, AclMixin, models.Model): objects_pool = cls.objects.filter( Q(type_user='All') | Q(type_user='Adherent') ) - if not target_user.is_adherent(): + if target_user is not None and not target_user.is_adherent(): objects_pool = objects_pool.filter( Q(type_cotisation='All') | Q(type_cotisation='Adhesion') )