summaryrefslogtreecommitdiff
path: root/ishtar_common/wizards.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-07-06 12:48:33 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-07-06 15:00:29 +0200
commit9a6f1dccc4e24467e73dd2a9bb5f7e81b1116d19 (patch)
tree4e29aa55f38ef3e6482367ad51421302166c0330 /ishtar_common/wizards.py
parent6eee2676bde3fc72d57338540fc4ce89847c2cb6 (diff)
downloadIshtar-9a6f1dccc4e24467e73dd2a9bb5f7e81b1116d19.tar.bz2
Ishtar-9a6f1dccc4e24467e73dd2a9bb5f7e81b1116d19.zip
🐛 wizards: fix autofocus of first field
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r--ishtar_common/wizards.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 475c426bb..aa5e1804d 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -1227,7 +1227,8 @@ class Wizard(IshtarWizard):
first_field = None
for key in frm.fields:
field = frm.fields[key]
- if not field.widget.input_type == "hidden":
+ if not hasattr(field.widget, "input_type") \
+ or not field.widget.input_type == "hidden":
first_field = field
break
if first_field: