From 06e036c7ea16284bdef0e698a005e5fd6a515757 Mon Sep 17 00:00:00 2001 From: QS5ELkMu Date: Fri, 26 Apr 2019 08:50:30 +0200 Subject: [PATCH] Update web_access_rule_buttons/models/models.py Co-Authored-By: espo-tony --- web_access_rule_buttons/models/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_access_rule_buttons/models/models.py b/web_access_rule_buttons/models/models.py index 629778e7..38dd9368 100644 --- a/web_access_rule_buttons/models/models.py +++ b/web_access_rule_buttons/models/models.py @@ -18,7 +18,7 @@ class Base(models.AbstractModel): :param operation: a list of ``read``, ``create``, ``write``, ``unlink`` :return: {operation: access} (access is a boolean) """ - if operations or None: + if not operations or not any(operations): operations = ['read', 'create', 'write', 'unlink'] result = {} for operation in operations: