diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-08 22:28:33 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-08 22:28:33 +0100 |
commit | 68546d42c0b7bf16993de15b979cef128d5d8d9a (patch) | |
tree | fc11a27ea6e2a213f8cd80222395220fe65f33dd | |
parent | d7fdb2e13ec5623de90373a137750d799273ac6c (diff) | |
download | Ishtar-68546d42c0b7bf16993de15b979cef128d5d8d9a.tar.bz2 Ishtar-68546d42c0b7bf16993de15b979cef128d5d8d9a.zip |
Export: allow models_finds and models_treatments settings
-rw-r--r-- | ishtar_common/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 5b21a9a49..f22600d12 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1738,7 +1738,8 @@ def import_class(full_path_classname): mods = full_path_classname.split('.') if len(mods) == 1: mods = ['ishtar_common', 'models', mods[0]] - elif 'models' not in mods: + elif 'models' not in mods and 'models_finds' not in mods \ + and 'models_treatments' not in mods: raise SuspiciousOperation( u"Try to import a non model from a string") module = import_module('.'.join(mods[:-1])) |