Commit 130b1ac5 authored by Jérome Perrin's avatar Jérome Perrin

ERP5; work around sort on creation date precision in Alarm.getLastActiveProcess

parent dea9c839
...@@ -345,11 +345,11 @@ Alarm Tool Node: %s ...@@ -345,11 +345,11 @@ Alarm Tool Node: %s
limit = 1 limit = 1
else: else:
limit = self.isActive() and 2 or 1 limit = self.isActive() and 2 or 1
active_process_list = self.getPortalObject().portal_catalog( active_process_list = sorted(self.getPortalObject().portal_catalog(
portal_type='Active Process', limit=limit, portal_type='Active Process',
sort_on=(('creation_date', 'DESC'), sort_on=(('creation_date', 'DESC'), ),
('id', 'DESC', 'UNSIGNED'),), causality_uid=self.getUid(),
causality_uid=self.getUid()) limit=5,), key=lambda x:x.getCreationDate(),)[-limit:]
if len(active_process_list) < limit: if len(active_process_list) < limit:
process = None process = None
else: else:
......
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