From 167bc60123eb3b075fade574f7c5531cf7db9ed6 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sun, 15 Jul 2018 20:43:20 +0200 Subject: [PATCH] Fix le can_create de Facture --- cotisations/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cotisations/models.py b/cotisations/models.py index c35f0220..52d71b58 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -232,9 +232,9 @@ class Facture(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model): return True, None if len(Paiement.find_allowed_payments(user_request)) <= 0: return False, _("There are no payment types which you can use.") - if len(Article.find_allowed_articles(user_request)): + if len(Article.find_allowed_articles(user_request)) <= 0: return False, _("There are no article that you can buy.") - return True + return True, None def __init__(self, *args, **kwargs): super(Facture, self).__init__(*args, **kwargs)