Commit c4554d57 authored by Nicolas Delaby's avatar Nicolas Delaby

Use simplier condition expression

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35820 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 46dc7a80
...@@ -272,7 +272,7 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -272,7 +272,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
return conflict_list return conflict_list
if keyword is None: # This is not a selection, directly the property if keyword is None: # This is not a selection, directly the property
keyword = xml.xpath('name()') keyword = xml.xpath('name()')
if not (keyword in self.NOT_EDITABLE_PROPERTY): if keyword not in self.NOT_EDITABLE_PROPERTY:
# We will look for the data to enter # We will look for the data to enter
xpath_expression = xml.get('select', xpath_expression) xpath_expression = xml.get('select', xpath_expression)
context = self.getContextFromXpath(object, xpath_expression) context = self.getContextFromXpath(object, xpath_expression)
...@@ -288,7 +288,7 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -288,7 +288,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
#last synchronization #last synchronization
# - current_data : the data actually on this box # - current_data : the data actually on this box
isConflict = False isConflict = False
if (previous_xml is not None) and (not force): if previous_xml is not None and not force:
# if no previous_xml, no conflict # if no previous_xml, no conflict
#old_data = self.getObjectProperty(keyword, previous_xml, #old_data = self.getObjectProperty(keyword, previous_xml,
#data_type=data_type) #data_type=data_type)
...@@ -318,7 +318,7 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -318,7 +318,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
conflict.setRemoteValue(data) conflict.setRemoteValue(data)
conflict_list += [conflict] conflict_list += [conflict]
# We will now apply the argument with the method edit # We will now apply the argument with the method edit
if args != {} and (isConflict == 0 or force) and \ if args and (not isConflict or force) and \
(not simulate or reset): (not simulate or reset):
self._updateContent(object=context, **args) self._updateContent(object=context, **args)
# It is sometimes required to do something after an edit # It is sometimes required to do something after an edit
......
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