From a6b343745b92f5738ad0e2425ff31850dd935d43 Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Wed, 1 Jun 2005 12:08:39 +0000
Subject: [PATCH] do not call generateNewId if the subscriber alreasy has an id

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3135 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5SyncML/Publication.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/product/ERP5SyncML/Publication.py b/product/ERP5SyncML/Publication.py
index a1a2dfd715..e20f6527ee 100755
--- a/product/ERP5SyncML/Publication.py
+++ b/product/ERP5SyncML/Publication.py
@@ -196,7 +196,9 @@ class Publication(Subscription):
     """
     # We have to remove the subscriber if it already exist (there were probably a reset on the client)
     self.delSubscriber(subscriber.getSubscriptionUrl())
-    new_id = str(self.generateNewId())
+    new_id = subscriber.getId()
+    if new_id is None:
+      new_id = str(self.generateNewId())
     subscriber.id = new_id
     #if len(self.list_subscribers) == 0:
     #  self.list_subscribers = []
-- 
2.30.9