Commit f4a92b76 authored by Sebastien Robin's avatar Sebastien Robin

added everything in order to get the copy path


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1430 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 45c327f9
...@@ -58,6 +58,7 @@ class Conflict(SyncCode, Base): ...@@ -58,6 +58,7 @@ class Conflict(SyncCode, Base):
self.setRemoteValue(subscriber_value) self.setRemoteValue(subscriber_value)
self.subscriber = subscriber self.subscriber = subscriber
self.resetXupdate() self.resetXupdate()
self.copy_path = None
def getObjectPath(self): def getObjectPath(self):
""" """
...@@ -213,6 +214,18 @@ class Conflict(SyncCode, Base): ...@@ -213,6 +214,18 @@ class Conflict(SyncCode, Base):
""" """
return self.keyword return self.keyword
def getCopyPath(self):
"""
Get the path of the copy, or None if none has been made
"""
copy_path = self.copy_path
return copy_path
def setCopyPath(self, path):
"""
"""
self.copy_path = path
class Signature(Folder,SyncCode): class Signature(Folder,SyncCode):
""" """
status -- SENT, CONFLICT... status -- SENT, CONFLICT...
...@@ -844,8 +857,8 @@ class Subscription(Folder, SyncCode): ...@@ -844,8 +857,8 @@ class Subscription(Folder, SyncCode):
query_list = query_method() query_list = query_method()
if callable(query): if callable(query):
query_list = query(destination) query_list = query(destination)
query_list = filter(lambda x: x.id.find('conflict_copy')<0,query_list) return [x for x in query_list
return filter(lambda x: getattr(x,'_conflict_resolution',None)==None,query_list) if not getattr(x,'_conflict_resolution',False)]
def generateNewIdWithGenerator(self, object=None,gid=None): def generateNewIdWithGenerator(self, object=None,gid=None):
""" """
......
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