From 223711c8ff2518aca66efad150c929765e8afecd Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Wed, 28 Jan 2015 15:06:44 +0100 Subject: [PATCH] [IMP] ignore rules for nonexisting objects --- auditlog/models/rule.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/auditlog/models/rule.py b/auditlog/models/rule.py index 338eb7f47..56c8ebc5c 100644 --- a/auditlog/models/rule.py +++ b/auditlog/models/rule.py @@ -123,6 +123,9 @@ class auditlog_rule(models.Model): for rule in self: if rule.state != 'subscribed': 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] # CRUD # -> create