From 68546d42c0b7bf16993de15b979cef128d5d8d9a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 8 Mar 2017 22:28:33 +0100 Subject: Export: allow models_finds and models_treatments settings --- ishtar_common/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ishtar_common') 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])) -- cgit v1.2.3