summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
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
commit43af6dd9f95936284581275f3b762f81e032960b (patch)
tree4124a46812c68edb65c50679567e93213c6507e6 /ishtar_common
parent652e5c07c3dd2e7d825af0713c3d96c54ba56101 (diff)
downloadIshtar-43af6dd9f95936284581275f3b762f81e032960b.tar.bz2
Ishtar-43af6dd9f95936284581275f3b762f81e032960b.zip
Automatic copy of associated archaeological file on operation creation (refs #1745)
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/widgets.py5
-rw-r--r--ishtar_common/wizards.py2
2 files changed, 4 insertions, 3 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
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index d506c8552..878f083a3 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2010-2014 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as