Skip to content

Commit

Permalink
patch(TGE): Manifest default description field
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Mar 28, 2024
1 parent 8de8df9 commit dbcd4ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions modules/connectors/tge/karrio/providers/tge/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ def manifest_request(
Reference=[
tge.ReferenceType(
ReferenceType="ShipmentReference1",
ReferenceValue=shipment_payload.reference
or getattr(
shipment_payload, "id", "N/A"
ReferenceValue=(
shipment_payload.reference
or getattr(
shipment_payload,
"id",
"N/A",
)
),
),
]
Expand All @@ -275,7 +279,9 @@ def manifest_request(
or "BAG"
),
),
Description=package.description,
Description=(
package.description or "N/A"
),
Dimensions=tge.DimensionsType(
Height=package.height.map(
provider_units.MeasurementOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def shipment_request(
),
]
),
FreightMode=(
FreightMode=lib.identity(
lib.text(options.tge_freight_mode.state)
or lib.text(
settings.connection_config.freight_mode.state
Expand Down

0 comments on commit dbcd4ca

Please sign in to comment.