Skip to content

Commit

Permalink
(handle) nullable options check
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Jul 15, 2023
1 parent cab11d9 commit 99b4642
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions requirements.server.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ django-debug-toolbar
# -e ./schemas/dpdhl

# Carrier Extentions in Development
# -e ./sdk/core
-e ./sdk/core
# -e ./sdk/extensions/generic
# -e ./sdk/extensions/amazon_mws
# -e ./sdk/extensions/aramex
Expand All @@ -29,8 +29,8 @@ django-debug-toolbar
# -e ./sdk/extensions/sendle
# -e ./sdk/extensions/sf_express
# -e ./sdk/extensions/tnt
# -e ./sdk/extensions/ups
# -e ./sdk/extensions/usps
-e ./sdk/extensions/ups
-e ./sdk/extensions/usps
# -e ./sdk/extensions/usps_international
# -e ./sdk/extensions/yanwen
# -e ./sdk/extensions/yunexpress
Expand All @@ -41,7 +41,7 @@ django-debug-toolbar
# -e ./sdk/vendors/freightcom


karrio
# karrio
karrio.generic
karrio.amazon-mws
karrio.aramex
Expand All @@ -66,8 +66,8 @@ karrio.royalmail
karrio.sendle
karrio.sf-express
karrio.tnt
karrio.ups
karrio.usps
# karrio.ups
# karrio.usps
karrio.usps-international
karrio.yanwen
karrio.yunexpress
Expand Down
4 changes: 2 additions & 2 deletions sdk/extensions/ups/karrio/providers/ups/rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def rate_request(
else None
),
)
if options.pickup_options and options.pickup_options.state and any(options.pickup_options.state)
if any(options.pickup_options.state or [])
else None
),
DeliveryOptions=(
Expand All @@ -285,7 +285,7 @@ def rate_request(
else None
),
)
if options.delivery_options and options.delivery_options.state and any(options.delivery_options.state)
if any(options.delivery_options.state or [])
else None
),
RestrictedArticles=(
Expand Down

0 comments on commit 99b4642

Please sign in to comment.