summaryrefslogtreecommitdiff
path: root/ishtar_common/data_importer.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-02-26 20:00:21 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-05-06 16:04:02 +0200
commit7e76b86d6f0176f9561876ae465e1483b15a246f (patch)
tree3982f2a204b906384ea665d7d71a1c8e1c38cab6 /ishtar_common/data_importer.py
parenta49b3d93a8338bb5680fda8d40df22415f4975be (diff)
downloadIshtar-7e76b86d6f0176f9561876ae465e1483b15a246f.tar.bz2
Ishtar-7e76b86d6f0176f9561876ae465e1483b15a246f.zip
Automatically update raw_general_contractor and raw_town_planning_service on save - improve pdl import of raw_names and of dates
Diffstat (limited to 'ishtar_common/data_importer.py')
-rw-r--r--ishtar_common/data_importer.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py
index 6b021e6f3..09c511a25 100644
--- a/ishtar_common/data_importer.py
+++ b/ishtar_common/data_importer.py
@@ -449,6 +449,13 @@ class StrToBoolean(Formater, ChoiceChecker):
logger = logging.getLogger(__name__)
+def get_object_from_path(obj, path):
+ for k in path.split('__')[:-1]:
+ if not hasattr(obj, k):
+ return
+ obj = getattr(obj, k)
+ return obj
+
class Importer(object):
DESC = ""
LINE_FORMAT = []