comparison sat/tools/xml_tools.py @ 4032:bb211f80c3e6

tools (xml_tools): add fields's `values` when converting data form to dict
author Goffi <goffi@goffi.org>
date Fri, 07 Apr 2023 14:59:01 +0200
parents 818db4ca3717
children 524856bd7b19
comparison
equal deleted inserted replaced
4031:a2d4bd1943ba 4032:bb211f80c3e6
224 fields.append(field) 224 fields.append(field)
225 for src_name, dest_name in ( 225 for src_name, dest_name in (
226 ('var', 'name'), 226 ('var', 'name'),
227 ('label', 'label'), 227 ('label', 'label'),
228 ('value', 'value'), 228 ('value', 'value'),
229 # FIXME: we probably should have only "values"
230 ('values', 'values')
229 ): 231 ):
230 value = getattr(form_field, src_name, None) 232 value = getattr(form_field, src_name, None)
231 if value: 233 if value:
232 field[dest_name] = value 234 field[dest_name] = value
233 if form_field.options: 235 if form_field.options: