Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix bug where arguments in add_error are incorrect
Unknown1aefb88ab82f
diff --git a/saleor/graphql/order/mutations/orders.py b/saleor/graphql/order/mutations/orders.pyindex 9165149a96..6ed1cb2541 100644--- a/saleor/graphql/order/mutations/orders.py+++ b/saleor/graphql/order/mutations/orders.py@@ -289,7 +289,8 @@ class OrderCapture(BaseMutation):def mutate(cls, root, info, id, amount):errors = []if amount <= 0:- cls.add_error('Amount should be a positive number.')+ cls.add_error(+ errors, amount, 'Amount should be a positive number.')return OrderCapture(errors=errors)order = cls.get_node_or_error(info, id, errors, 'id', Order)@@ -355,7 +356,8 @@ class OrderRefund(BaseMutation):def mutate(cls, root, info, id, amount):errors = []if amount <= 0:- cls.add_error('Amount should be a positive number.')+ cls.add_error(+ errors, amount, 'Amount should be a positive number.')return OrderRefund(errors=errors)order = cls.get_node_or_error(info, id, errors, 'id', Order)