From 1f95f25a87fbbc696bf528e1c00a8aa734ced035 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 11 Feb 2022 21:46:15 +0100 Subject: fix default dataform field handling (#3554) --- poezio/windows/data_forms.py | 7 ++++--- 1 file 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': -- cgit v1.2.3