Commit f2aa05e9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

erp5_syncml: invoke callback method by activity in non split_indexation case...

erp5_syncml: invoke callback method by activity in non split_indexation case as well to make transaction shorter.
parent 81da8bd5
......@@ -137,11 +137,11 @@ class SyncMLSubscription(XMLObject):
result_count = len(r_list)
if result_count:
r = [str(x.path) for x in r_list]
callback_method = getattr(self.activate(**activate_kw), callback)
if not limit:
# We do not split in activity so call the callback right now
syncml_logger.info("getAndIndex : got %d result and no limit, calling callback...",
result_count)
callback_method = getattr(self, callback)
callback_method(path_list=r[:],
activate_kw=activate_kw,
**method_kw)
......@@ -159,8 +159,6 @@ class SyncMLSubscription(XMLObject):
callback, method_kw, activate_kw, **kw)
generated_other_activity = True
activate = self.activate
callback_method = getattr(activate(**activate_kw), callback)
if generated_other_activity:
for i in range(0, result_count, packet_size):
syncml_logger.info("-- getAndIndex : recursive call, generating for %s",
......
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