Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix fulfillment update with no tracking code

Pacu285864adc8107
diff --git a/saleor/graphql/order/mutations/fulfillments.py b/saleor/graphql/order/mutations/fulfillments.py
index f1679c4f40..f759e451bc 100644
--- a/saleor/graphql/order/mutations/fulfillments.py
+++ b/saleor/graphql/order/mutations/fulfillments.py
@@ -164,8 +164,8 @@ class FulfillmentUpdateTracking(BaseMutation):
info, id, errors, 'id', Fulfillment)
if errors:
return cls(errors=errors)
- tracking_number = input.get('tracking_number')
- fulfillment.tracking_number = input.get('tracking_number')
+ tracking_number = input.get('tracking_number') or ''
+ fulfillment.tracking_number = tracking_number
fulfillment.save()
order = fulfillment.order
order.events.create(