Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Raise an exception in case of invalid action in payment form
Marcin Gębala7997ccf1b502
diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.pyindex ecc660d7dd..5dab159765 100644--- a/saleor/dashboard/order/forms.py+++ b/saleor/dashboard/order/forms.py@@ -37,6 +37,8 @@ class ManagePaymentForm(forms.Form):self.payment.refund(amount)elif action == 'release' and self.payment.status == 'preauth':self.payment.release()+ else:+ raise ValueError(_('Invalid payment action'))class MoveItemsForm(forms.Form):