diff --git a/product/ERP5Form/MultiRelationField.py b/product/ERP5Form/MultiRelationField.py index 92baa9a2c523ad8e7dc44209ff67a3807691c153..bd31068bea4a103ce8e0b1dcc95bbfbdf02d95f2 100755 --- a/product/ERP5Form/MultiRelationField.py +++ b/product/ERP5Form/MultiRelationField.py @@ -349,10 +349,10 @@ class MultiRelationStringFieldValidator(Validator.LinesValidator, RelationField relation_uid_list = REQUEST.get(relation_field_id, None) relation_field_sub_id = 'relation_%s_0' % ( key ) if checkSameKeys( value_list, current_value_list ) and (relation_uid_list is None) and (not REQUEST.has_key( relation_field_sub_id )): - # XXX Will be interpreted by Base_edit as "do nothing" - #return MultiRelationEditor(field.id, base_category, portal_type, portal_type_item, catalog_index, relation_setter_id, None) - return None - + # Will be interpreted by Editor as "do nothing" + return MultiRelationEditor(field.id, base_category, + portal_type, portal_type_item, + catalog_index, relation_setter_id, None) else: relation_field_id = 'relation_%s' % ( key ) diff --git a/product/ERP5Form/RelationField.py b/product/ERP5Form/RelationField.py index 48ed73b83c718996137261e6f084d5126e528ff8..c0404251d09f420fbd9a1e425e3564c37e4281ba 100755 --- a/product/ERP5Form/RelationField.py +++ b/product/ERP5Form/RelationField.py @@ -340,10 +340,10 @@ class RelationStringFieldValidator(Validator.StringValidator): relation_setter_id = field.get_value('relation_setter_id') if (value == current_value) and (relation_uid is None): - return None -# XXX return RelationEditor(key, base_category, portal_type, None, -# portal_type_item, catalog_index, value, relation_setter_id, None) - # Will be interpreted by Base_edit as "do nothing" + # Will be interpreted by Editor as "do nothing" + return RelationEditor(key, base_category, portal_type, None, + portal_type_item, catalog_index, None, + relation_setter_id, None) if relation_uid not in (None, ''): # A value has been defined by the user if type(relation_uid) in (type([]), type(())):