[9.0][FIX] fetchmail_thread_default: check model in env for update module

pull/339/head
Sergio Teruel Albert 2017-07-19 10:28:49 +02:00 committed by David
parent a197470eb3
commit 56a350af0e
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class FetchmailServer(models.Model):
]).mapped("model_id")
# Exclude AbstractModel
return [(m.model, m.name) for m in models
if getattr(self.env[m.model], "_auto")]
if m.model in self.env and getattr(self.env[m.model], "_auto")]
# TODO New api on v10+
# pylint: disable=old-api7-method-defined