Browse Source

[IMP] ignore rules for nonexisting objects

pull/1040/head
Holger Brunn 10 years ago
committed by Enric Tobella
parent
commit
223711c8ff
No known key found for this signature in database GPG Key ID: 1A2546A1B7BA2451
  1. 3
      auditlog/models/rule.py

3
auditlog/models/rule.py

@ -123,6 +123,9 @@ class auditlog_rule(models.Model):
for rule in self: for rule in self:
if rule.state != 'subscribed': if rule.state != 'subscribed':
continue continue
if not self.pool.get(rule.model_id.model):
# ignore rules for models not loadable currently
continue
model_model = self.env[rule.model_id.model] model_model = self.env[rule.model_id.model]
# CRUD # CRUD
# -> create # -> create

Loading…
Cancel
Save