Skip to content

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

Only filter preauthorized order from succeeded transantions

jxltom9bfedf4bee7c
diff --git a/saleor/order/models.py b/saleor/order/models.py
index b5c00114fa..92ffbb9941 100644
--- a/saleor/order/models.py
+++ b/saleor/order/models.py
@@ -183,7 +183,8 @@ class Order(models.Model):
def is_pre_authorized(self):
return self.payments.filter(
is_active=True,
- transactions__kind=TransactionKind.AUTH).exists()
+ transactions__kind=TransactionKind.AUTH).filter(
+ transactions__is_success=True).exists()
@property
def quantity_fulfilled(self):