Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Change comment
Adam Bogdałcafb08300228
diff --git a/saleor/order/models.py b/saleor/order/models.pyindex 045ee47506..f147d7f12d 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -319,13 +319,10 @@ class OrderedItem(models.Model, ItemLine):class PaymentManager(models.Manager):def last(self):- """- Returns the last object without touching db- """+ # using .all() here reuses data fetched by prefetch_relatedobjects = list(self.all()[:1])if objects:return objects[0]- return Noneclass Payment(BasePayment):