Search notification email model by name
Since a4f34799 the field containing the name of the model is 'name'. Closes #14006
This commit is contained in:
@@ -42,7 +42,7 @@ class Trigger(metaclass=PoolMeta):
|
||||
if self.notification_email:
|
||||
try:
|
||||
trigger_model, = Model.search([
|
||||
('model', '=', self.notification_email.model),
|
||||
('name', '=', self.notification_email.model),
|
||||
])
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user