diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-07-10 17:15:08 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-07-10 17:15:08 +0200 | 
| commit | 08e5ccfd174c4faf8c590bd4bd4e3663de40799f (patch) | |
| tree | abaca305ec98735dc8dd295b8527dd98242ae1d6 /ishtar/ishtar_base/forms.py | |
| parent | 8a7205614d9899b758515479a383df2919088c40 (diff) | |
| download | Ishtar-08e5ccfd174c4faf8c590bd4bd4e3663de40799f.tar.bz2 Ishtar-08e5ccfd174c4faf8c590bd4bd4e3663de40799f.zip | |
Correct town display (closes #524)
Diffstat (limited to 'ishtar/ishtar_base/forms.py')
| -rw-r--r-- | ishtar/ishtar_base/forms.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/ishtar/ishtar_base/forms.py b/ishtar/ishtar_base/forms.py index 0bed1b28d..1021caee5 100644 --- a/ishtar/ishtar_base/forms.py +++ b/ishtar/ishtar_base/forms.py @@ -620,7 +620,10 @@ class Wizard(NamedUrlSessionFormWizard):                      initial[base_field] = unicode(value)          elif hasattr(c_form, 'management_form'):              initial = [] -            key = current_step.split('-')[0] +            if hasattr(c_form.form, 'base_model'): +                key = c_form.form.base_model + 's' +            else: +                key = current_step.split('-')[0]              if not hasattr(obj, key):                  return initial              keys = c_form.form.base_fields.keys() | 
