From a989624ce6d6d2f1e84b5d2b9badd24b3a3541cd Mon Sep 17 00:00:00 2001 From: chirac Date: Sat, 2 Jan 2021 23:03:13 +0100 Subject: [PATCH] Return True when list is returned --- machines/models.py | 6 +++--- users/models.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/machines/models.py b/machines/models.py index 4f359477..9fd524be 100644 --- a/machines/models.py +++ b/machines/models.py @@ -398,7 +398,7 @@ class MachineType(RevMixin, AclMixin, models.Model): ) else: return ( - False, + True, _("You don't have the right to use all machine types."), ("machines.use_all_machinetype",), cls.objects.filter( @@ -1001,7 +1001,7 @@ class Extension(RevMixin, AclMixin, models.Model): ) else: return ( - False, + True, _("You don't have the right to list all extensions."), ("machines.use_all_extension",), cls.objects.filter(need_infra=False), @@ -2204,7 +2204,7 @@ class IpList(RevMixin, AclMixin, models.Model): ) else: return ( - False, + True, _("You don't have the right to use all machine types."), ("machines.use_all_machinetype",), cls.objects.filter( diff --git a/users/models.py b/users/models.py index 9fb10972..2b6eaacf 100755 --- a/users/models.py +++ b/users/models.py @@ -2086,7 +2086,7 @@ class Adherent(User): ) else: return ( - False, + True, _("You don't have the right to list all adherents."), ("users.view_user",), cls.objects.none(),