Skip to content

Commit

Permalink
[FIX] dpd get label when no reference is sent
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-dacosta committed Apr 17, 2024
1 parent 9e47aff commit 1ec4a71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions roulier/carriers/dpd_fr_soap/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def transform_input_to_carrier_webservice(self, data):
)
# dpd is configure with manage_multi_label = False, so always only 1 pack
if (
data["parcels"]
and data["parcels"][0]["reference"]
and not data["service"]["reference2"]
data.get("parcels")
and data["parcels"][0].get("reference")
and not data["service"].get("reference2")
):
data["service"]["reference2"] = data["parcels"][0]["reference"]

Expand Down

0 comments on commit 1ec4a71

Please sign in to comment.