summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2022-02-11 21:46:15 +0100
committermathieui <mathieui@mathieui.net>2022-02-11 21:46:15 +0100
commit1f95f25a87fbbc696bf528e1c00a8aa734ced035 (patch)
treeafa394031ada024ad61a10ac39b466a8399ac19f
parentc7711a8a614e9147b2caf16455ba6287e54dee00 (diff)
downloadpoezio-1f95f25a87fbbc696bf528e1c00a8aa734ced035.tar.gz
poezio-1f95f25a87fbbc696bf528e1c00a8aa734ced035.tar.bz2
poezio-1f95f25a87fbbc696bf528e1c00a8aa734ced035.tar.xz
poezio-1f95f25a87fbbc696bf528e1c00a8aa734ced035.zip
fix default dataform field handling (#3554)
-rw-r--r--poezio/windows/data_forms.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/poezio/windows/data_forms.py b/poezio/windows/data_forms.py
index 1b22aa2c..db174703 100644
--- a/poezio/windows/data_forms.py
+++ b/poezio/windows/data_forms.py
@@ -6,6 +6,7 @@ does not inherit from the Win base class), as it will create the
others when needed.
"""
+from typing import Type
from poezio.windows import base_wins
from poezio.windows.base_wins import Win
from poezio.windows.inputs import Input
@@ -397,10 +398,10 @@ class FormWin:
for (name, field) in self._form.getFields().items():
if field['type'] == 'hidden':
continue
- try:
+ if field['type'] not in self.input_classes:
+ input_class: Type[FieldInputMixin] = TextSingleWin
+ else:
input_class = self.input_classes[field['type']]
- except IndexError:
- continue
label = field['label']
desc = field['desc']
if field['type'] == 'fixed':