Skip to content

Commit

Permalink
prevent tracking response parsing when shipment info is None
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Jul 7, 2018
1 parent d4c3660 commit 82de797
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openship/mappers/dhl/dhl_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def _extract_quote(self, quotes: List[E.quote_details], qtdshpNode) -> List[E.qu
def _extract_tracking(self, trackings: List[E.tracking_details], awbInfoNode) -> List[E.tracking_details]:
awbInfo = TrackRes.AWBInfo()
awbInfo.build(awbInfoNode)
if awbInfo.ShipmentInfo == None:
return trackings
return trackings + [
E.Tracking.parse(
carrier=self.client.carrier_name,
Expand Down

0 comments on commit 82de797

Please sign in to comment.