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 | 90f5d2ffea198c0d761baa18a68701984c70aa3e (patch) | |
tree | fc11a27ea6e2a213f8cd80222395220fe65f33dd | |
parent | c51e65e21f18809d7c794b41a590775a404bf11c (diff) | |
download | Ishtar-90f5d2ffea198c0d761baa18a68701984c70aa3e.tar.bz2 Ishtar-90f5d2ffea198c0d761baa18a68701984c70aa3e.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])) |