Commit e3d65b49 authored by Jean-Paul Smets's avatar Jean-Paul Smets

*** empty log message ***


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2287 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8dd864b9
...@@ -258,12 +258,14 @@ class RelationStringFieldValidator(Validator.StringValidator): ...@@ -258,12 +258,14 @@ class RelationStringFieldValidator(Validator.StringValidator):
value = Validator.StringValidator.validate(self, field, key, REQUEST) value = Validator.StringValidator.validate(self, field, key, REQUEST)
# If the value is the same as the current field value, do nothing # If the value is the same as the current field value, do nothing
current_value = field.get_value('default') current_value = field.get_value('default')
if value == current_value:
return RelationEditor(None, None, None, None, None, None, value, None, None) # Will be interpreted by Base_edit as "do nothing"
# If a relation has been defined in a popup menu, use it # If a relation has been defined in a popup menu, use it
relation_uid = REQUEST.get(relation_field_id, None) relation_uid = REQUEST.get(relation_field_id, None)
catalog_index = field.get_value('catalog_index') catalog_index = field.get_value('catalog_index')
relation_setter_id = field.get_value('relation_setter_id') relation_setter_id = field.get_value('relation_setter_id')
if value == current_value:
return RelationEditor(key, base_category, portal_type, None,
portal_type_item, catalog_index, value, relation_setter_id, display_text)
# Will be interpreted by Base_edit as "do nothing"
if relation_uid not in (None, ''): if relation_uid not in (None, ''):
# A value has been defined by the user # A value has been defined by the user
if type(relation_uid) in (type([]), type(())): relation_uid = relation_uid[0] if type(relation_uid) in (type([]), type(())): relation_uid = relation_uid[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment