Update web_access_rule_buttons/models/models.py

Co-Authored-By: espo-tony <espo-tony@users.noreply.github.com>
This commit is contained in:
QS5ELkMu
2019-04-26 08:50:30 +02:00
committed by GitHub
parent db24654f65
commit 06e036c7ea

View File

@@ -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: