Commit c7db1ba0 authored by Jérome Perrin's avatar Jérome Perrin

core: reuse _getObjectByUid in TrackingBrain.getDate

This uses caching (which will probably never be hit here), prevent
problems if delivery_uid is null (which should not happen) but it's
consistent with other brain methods.
parent 6bb1db0b
......@@ -296,8 +296,7 @@ class TrackingListBrain(InventoryListBrain):
# the brain is accessed from the Shared.DC.ZRDB.Results.Results instance
obj = self.getObject()
if obj is not None:
portal = obj.getPortalObject()
movement = portal.portal_catalog.getObject(self.delivery_uid)
movement = self._getObjectByUid(self.delivery_uid)
date = movement.getStartDate() or movement.getStopDate()
if date is not None:
timezone = date.timezone()
......
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