summaryrefslogtreecommitdiff
path: root/ishtar_common/wizards.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r--ishtar_common/wizards.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index cc371b5e2..abbdda711 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -749,9 +749,15 @@ class Wizard(NamedUrlWizardView):
if hasattr(c_form, 'base_fields'):
for base_field in c_form.base_fields.keys():
value = obj
+ base_model = None
if hasattr(c_form, 'base_model') and \
base_field == c_form.base_model:
- key = c_form.base_model + 's'
+ base_model = base_field
+ if hasattr(c_form, 'base_models') and \
+ base_field in c_form.base_models:
+ base_model = base_field
+ if base_model:
+ key = base_model + 's'
initial.setlist(base_field, [
unicode(val.pk) for val in getattr(obj, key).all()])
else: