diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2014-04-03 13:42:20 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2014-04-03 13:42:20 +0200 | 
| commit | f03c9a7f969d66d4b7ccb945e14f567022f59528 (patch) | |
| tree | 4124a46812c68edb65c50679567e93213c6507e6 /ishtar_common/widgets.py | |
| parent | 3bf841c2a36981417115fa4168e5565b53fa29ff (diff) | |
| download | Ishtar-f03c9a7f969d66d4b7ccb945e14f567022f59528.tar.bz2 Ishtar-f03c9a7f969d66d4b7ccb945e14f567022f59528.zip  | |
Automatic copy of associated archaeological file on operation creation (refs #1745)
Diffstat (limited to 'ishtar_common/widgets.py')
| -rw-r--r-- | ishtar_common/widgets.py | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index fc3ada283..2105b73e3 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -211,8 +211,9 @@ class JQueryAutoComplete(forms.TextInput):                      selects.append("")
                  attrs_select['value'] = ", ".join(selects)
              else:
 -                attrs_hidden['value'] = hiddens[0]
 -                attrs_select['value'] = selects[0]
 +                if hiddens and selects:
 +                    attrs_hidden['value'] = hiddens[0]
 +                    attrs_select['value'] = selects[0]
          if not self.attrs.has_key('id'):
              attrs_hidden['id'] = 'id_%s' % name
              attrs_select['id'] = 'id_select_%s' % name
  | 
