3
0
Fork 0

Bugfixing: Always allow all operations when an empty recordset is passed

11.0
antonio 2019-04-19 16:33:34 +02:00
parent 86bd1b441c
commit db24654f65
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class Base(models.AbstractModel):
operations = ['read', 'create', 'write', 'unlink'] operations = ['read', 'create', 'write', 'unlink']
result = {} result = {}
for operation in operations: for operation in operations:
if self.is_transient() and not self.ids: if self.is_transient() or not self.ids:
# If we call check_access_rule() without id, it will try to # If we call check_access_rule() without id, it will try to
# run a SELECT without ID which will crash, so we just blindly # run a SELECT without ID which will crash, so we just blindly
# allow the operations # allow the operations