Skip to content

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

Apply code review suggestion

IKarbowiak529396e7f217
diff --git a/saleor/order/actions.py b/saleor/order/actions.py
index b4c873f6c8..9b36327f56 100644
--- a/saleor/order/actions.py
+++ b/saleor/order/actions.py
@@ -264,7 +264,7 @@ def order_fulfilled(
if order.status == OrderStatus.FULFILLED:
transaction.on_commit(lambda: manager.order_fulfilled(order))
for fulfillment in fulfillments:
- transaction.on_commit(lambda: manager.fulfillment_approved(fulfillment))
+ transaction.on_commit(lambda f=fulfillment: manager.fulfillment_approved(f))
if notify_customer:
for fulfillment in fulfillments:
@@ -478,7 +478,7 @@ def approve_fulfillment(
transaction.on_commit(lambda: manager.order_updated(order))
if order.status == OrderStatus.FULFILLED:
transaction.on_commit(lambda: manager.order_fulfilled(order))
- transaction.on_commit(lambda: manager.fulfillment_approved(fulfillment))
+ transaction.on_commit(lambda f=fulfillment: manager.fulfillment_approved(f))
if gift_card_lines_info:
gift_cards_create(