Verified Commit 21206bbe authored by VAN ZUIJLEN Nils's avatar VAN ZUIJLEN Nils
Browse files

Optimize SQL requests in OrderHistView

parent 0ae93fb8
......@@ -488,8 +488,23 @@ class OrderHistView(LoginRequiredMixin, ListView):
model = OrderItem
def get_queryset(self) -> "QuerySet[Order]":
orders = Order.objects.filter(user=self.request.user, ordered=True).order_by(
orders = (
for order in orders:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment