8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-07-13 17:54:46 +00:00

Merge branch 'fix_custom_invoice' into 'dev'

Fix custom invoice

See merge request federez/re2o!371
This commit is contained in:
chirac 2018-12-28 23:32:12 +01:00
commit 22c30c2775

View file

@ -624,7 +624,7 @@ class Article(RevMixin, AclMixin, models.Model):
objects_pool = cls.objects.filter( objects_pool = cls.objects.filter(
Q(type_user='All') | Q(type_user='Adherent') 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( objects_pool = objects_pool.filter(
Q(type_cotisation='All') | Q(type_cotisation='Adhesion') Q(type_cotisation='All') | Q(type_cotisation='Adhesion')
) )