Commit 28906f86 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix a bug in r36542 : if there is no movement, it means we have no related simulation movement.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36641 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b55c8069
...@@ -960,6 +960,8 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin): ...@@ -960,6 +960,8 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin):
search_method = \ search_method = \
self.getPortalObject().portal_catalog.unrestrictedSearchResults self.getPortalObject().portal_catalog.unrestrictedSearchResults
movement_uid_list = [x.getUid() for x in self.getMovementList()] movement_uid_list = [x.getUid() for x in self.getMovementList()]
if len(movement_uid_list) == 0:
return []
sim_movement_list = search_method(portal_type='Simulation Movement', sim_movement_list = search_method(portal_type='Simulation Movement',
delivery_uid=movement_uid_list, **kw) delivery_uid=movement_uid_list, **kw)
return sim_movement_list return sim_movement_list
......
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