From f4a92b760949a770c08aae9e172aaa6e871b9781 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Thu, 26 Aug 2004 08:37:28 +0000 Subject: [PATCH] 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 --- product/ERP5SyncML/Subscription.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/product/ERP5SyncML/Subscription.py b/product/ERP5SyncML/Subscription.py index 664128038f..244922f614 100755 --- a/product/ERP5SyncML/Subscription.py +++ b/product/ERP5SyncML/Subscription.py @@ -58,6 +58,7 @@ class Conflict(SyncCode, Base): self.setRemoteValue(subscriber_value) self.subscriber = subscriber self.resetXupdate() + self.copy_path = None def getObjectPath(self): """ @@ -213,6 +214,18 @@ class Conflict(SyncCode, Base): """ 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): """ status -- SENT, CONFLICT... @@ -844,8 +857,8 @@ class Subscription(Folder, SyncCode): query_list = query_method() if callable(query): query_list = query(destination) - query_list = filter(lambda x: x.id.find('conflict_copy')<0,query_list) - return filter(lambda x: getattr(x,'_conflict_resolution',None)==None,query_list) + return [x for x in query_list + if not getattr(x,'_conflict_resolution',False)] def generateNewIdWithGenerator(self, object=None,gid=None): """ -- 2.30.9