# HG changeset patch # User Goffi # Date 1643650552 -3600 # Node ID 0fac164ff2d83007fc2e58acd4cdf8daa287bb49 # Parent 7e51cfc36d4ece4c1a45826c0c262120bfa822c0 tools (xml_tools): fix `widget_args` modification in `_dataFormField2XMLUIData`: in `textbox` widget, the first arg was modified with all values, lettings other ones unchanger, resulting in invalid number of arguments. This has been fixed by replacing all args with the new value. diff -r 7e51cfc36d4e -r 0fac164ff2d8 sat/tools/xml_tools.py --- a/sat/tools/xml_tools.py Mon Jan 31 18:35:52 2022 +0100 +++ b/sat/tools/xml_tools.py Mon Jan 31 18:35:52 2022 +0100 @@ -89,7 +89,7 @@ else: field.value = field.label field.label = None - widget_args[0] = field.value + widget_args = [field.value] elif field.fieldType == "text-single": widget_type = "string" widget_kwargs["read_only"] = read_only @@ -98,7 +98,7 @@ widget_kwargs["read_only"] = read_only elif field.fieldType == "text-multi": widget_type = "textbox" - widget_args[0] = "\n".join(field.values) + widget_args = ["\n".join(field.values)] widget_kwargs["read_only"] = read_only elif field.fieldType == "hidden": widget_type = "hidden" @@ -108,7 +108,7 @@ elif field.fieldType == "boolean": widget_type = "bool" if widget_args[0] is None: - widget_args[0] = "false" + widget_args = ["false"] widget_kwargs["read_only"] = read_only elif field.fieldType == "integer": widget_type = "integer"