summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/data_importer.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py
index 272609d0f..d20096a91 100644
--- a/ishtar_common/data_importer.py
+++ b/ishtar_common/data_importer.py
@@ -909,6 +909,7 @@ class Importer(object):
def post_processing(self, idx_line, item):
# force django based post-processing for the item
+ item = item.__class__.objects.get(pk=item.pk)
item.save()
if hasattr(item, 'RELATED_POST_PROCESS'):
for related_key in item.RELATED_POST_PROCESS:
@@ -1213,6 +1214,7 @@ class Importer(object):
raise self._get_does_not_exist_in_db_error(
through_cls, get_data)
if not created and 'defaults' in data:
+ t_obj = t_obj.__class__.objects.get(pk=t_obj.pk)
for k in data['defaults']:
setattr(t_obj, k, data['defaults'][k])
t_obj.save()
@@ -1838,6 +1840,7 @@ class Importer(object):
else:
getattr(obj, attr).add(v)
# force post save script
+ v = v.__class__.objects.get(pk=v.pk)
v.save()
if self.simulate:
# put m2m result in data dict