Browse Source

[12.0][FIX] Add sudo() to retrieve record vals

12.0-mig-module_prototyper_last
tslai 4 years ago
parent
commit
3c95c34b8b
  1. 2
      auditlog/models/rule.py

2
auditlog/models/rule.py

@ -235,7 +235,7 @@ class AuditlogRule(models.Model):
# their values exist in cache.
new_values = {}
fields_list = rule_model.get_auditlog_fields(self)
for new_record in new_records:
for new_record in new_records.sudo():
new_values.setdefault(new_record.id, {})
for fname, field in new_record._fields.items():
if fname not in fields_list:

Loading…
Cancel
Save