summaryrefslogtreecommitdiff
path: root/ishtar_common/data_importer.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/data_importer.py')
-rw-r--r--ishtar_common/data_importer.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py
index d44a19319..baf943068 100644
--- a/ishtar_common/data_importer.py
+++ b/ishtar_common/data_importer.py
@@ -1574,6 +1574,9 @@ class Importer(object):
if attribute == 'data': # json field
# no need to do anything
return
+ if attribute == 'get_default':
+ # force evaluation of default value for this field
+ return
try:
field_object = cls._meta.get_field(attribute)
except FieldDoesNotExist:
@@ -1720,6 +1723,11 @@ class Importer(object):
defaults[k] = dct.pop(k)
else:
dct.pop(k)
+ if "get_default" in dct and dct["get_default"]:
+ dct.pop("get_default")
+ new_dct = defaults.copy()
+ new_dct.update(dct)
+ dct = new_dct
obj = None
if self.simulate: