Commit 5b8778ae authored by Yusei Tahara's avatar Yusei Tahara

Fix MovementHistoryListBrain constructor. start_date or stop_date may be None.

parent 42a9f6ed
......@@ -377,11 +377,17 @@ class MovementHistoryListBrain(InventoryListBrain):
# the brain is accessed from the Shared.DC.ZRDB.Results.Results instance
obj = self.getObject()
if obj is not None:
timezone = None
if self.node_relative_url == obj.getSource():
timezone = obj.getStartDate().timezone()
start_date = obj.getStartDate()
if start_date is not None:
timezone = start_date.timezone()
timezone = obj.getStopDate().timezone() =
stop_date = obj.getStopDate()
if stop_date is not None:
timezone = stop_date.timezone()
if timezone is not None: =
def _debit(self):
if self.getObject().isCancellationAmount():
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment