Skip to content

Commit 8835ae1

Browse files
committed
other fixes
1 parent 55553a0 commit 8835ae1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/design/plone/policy/patches/collective_volto_formsupport.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,20 @@ def add(self, data):
214214
record = Record()
215215
fields_labels = {}
216216
fields_order = []
217-
# start patch
217+
fields_types = {}
218218
for field_data in data:
219-
# end patch
220219
field_id = field_data.get("field_id", "")
221220
value = field_data.get("value", "")
222221
if field_id in fields:
223222
field = fields[field_id]
224223
record.attrs[field_id] = self.storedValue(value, field["type"])
225-
fields_labels[field_id] = fields[field_id]
224+
fields_types[field_id] = field.get("type", "")
225+
fields_labels[field_id] = field["label"]
226226
fields_order.append(field_id)
227+
# else: skip the field
227228
record.attrs["fields_labels"] = fields_labels
228229
record.attrs["fields_order"] = fields_order
230+
record.attrs["fields_types"] = fields_types
229231
record.attrs["date"] = datetime.now()
230232
record.attrs["block_id"] = self.block_id
231233

0 commit comments

Comments
 (0)