diff options
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 |
commit | 53be3b87eb1da93534f8d173183b55bb92e4717c (patch) | |
tree | 3982f2a204b906384ea665d7d71a1c8e1c38cab6 /ishtar_common/data_importer.py | |
parent | 802a19e209cd5786fb44fdcb95b47d6c51bbbb6f (diff) | |
download | Ishtar-53be3b87eb1da93534f8d173183b55bb92e4717c.tar.bz2 Ishtar-53be3b87eb1da93534f8d173183b55bb92e4717c.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.py | 7 |
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 = [] |