diff options
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r-- | ishtar_common/wizards.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 5f3d440e4..8fe1b5da2 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -423,6 +423,8 @@ class Wizard(NamedUrlWizardView): c_item.save() else: m = getattr(self.model, dependant_item) + if callable(m): + m = m() if hasattr(m, 'related'): c_item = m.related.model(**other_objs[dependant_item]) setattr(obj, dependant_item, c_item) @@ -432,6 +434,8 @@ class Wizard(NamedUrlWizardView): adds = {} for dependant_item in other_objs: m = getattr(self.model, dependant_item) + if callable(m): + m = m() model = m.field.rel.to c_dct = other_objs[dependant_item].copy() if issubclass(model, models.BaseHistorizedItem): |