Browse Source

Merge pull request #184 from Tecnativa/9.0-PR-fetchmail_thread_default

[9.0][FIX] fetchmail_thread_default: check model in env for update module
pull/206/head
Pedro M. Baeza 7 years ago
committed by GitHub
parent
commit
95bc1f7bc8
  1. 2
      fetchmail_thread_default/models/fetchmail_server.py

2
fetchmail_thread_default/models/fetchmail_server.py

@ -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

Loading…
Cancel
Save