diff --git a/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py b/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py index 98222d3334932aebac0eccad0dfbc9a129167de8..af8237deb162afeea11861675ed350e5059c6078 100644 --- a/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py +++ b/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py @@ -480,7 +480,7 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, k # Copy the dict, as some hashscript cache the result, # which should not in this case be modified result.update({"subfield_list": [x.copy() for x in getattr(field, hash_script_id)( - [x for x in result['items'] if (x[1] and x[0])], + [x for x in result['items'] if (x[1] != '' and x[0] != '')], # Drop empty values result['default'], default_sub_field_property_dict={ diff --git a/product/ERP5Form/ParallelListField.py b/product/ERP5Form/ParallelListField.py index 4ba615a85d57b2f37dd6df0b29bb93e8849c8f04..e02de7703e9902b6fe4921c733e43d3ff1665a7f 100644 --- a/product/ERP5Form/ParallelListField.py +++ b/product/ERP5Form/ParallelListField.py @@ -229,7 +229,7 @@ class ParallelListField(ZMIField): def generateSubForm(self, value, REQUEST): item_list = [x for x in self.get_value('items', REQUEST=REQUEST) - if x[0] != '' and x[1]] + if x[0] != '' and x[1] != ''] value_list = value if not isinstance(value_list, (list, tuple)):