Browse Source

Merge 6f1e8a8652 into 880df8eb7b

pull/710/merge
Antonio Esposito 5 years ago
committed by GitHub
parent
commit
d280af6a45
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      web_access_rule_buttons/models.py

11
web_access_rule_buttons/models.py

@ -25,6 +25,17 @@ def check_access_rule_all(self, operations=None):
# operations
result[operation] = True
continue
# If we're writing on a new o2m, m2m or m2o record related to a new
# record (for example an invoice line created altogether with the
# invoice to which it belongs), ids contains a string. Calling
# check_access_rule() in this condition will crash, so we just
# blindly allow the operations.
try:
for id in self.ids:
int(id)
except Exception:
result[operation] = True
continue
try:
self.check_access_rule(operation)
except exceptions.AccessError:

Loading…
Cancel
Save