Commit 8dd864b9 authored by Jean-Paul Smets's avatar Jean-Paul Smets

bugfix

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2286 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9c637fe6
...@@ -198,7 +198,7 @@ class RelationEditor: ...@@ -198,7 +198,7 @@ class RelationEditor:
REQUEST.set(self.field_id[len('field_'):], self.value) # XXX Dirty REQUEST.set(self.field_id[len('field_'):], self.value) # XXX Dirty
else: else:
# Make sure no default value appears # Make sure no default value appears
REQUEST.set(key, None) REQUEST.set(self.field_id[len('field_'):], None)
def view(self): def view(self):
return self.__dict__ return self.__dict__
...@@ -259,7 +259,7 @@ class RelationStringFieldValidator(Validator.StringValidator): ...@@ -259,7 +259,7 @@ class RelationStringFieldValidator(Validator.StringValidator):
# 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: if value == current_value:
return RelationEditor(None, None, None, None, None, None, None, None, None) # Will be interpreted by Base_edit as "do nothing" 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')
......
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