mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-22 18:55:29 +03:00
25 lines
978 B
Diff
25 lines
978 B
Diff
From 992d2df488ea2cf93b550622771f8d952d94465f Mon Sep 17 00:00:00 2001
|
|
From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
|
|
Date: Mon, 29 Mar 2021 18:27:25 +0300
|
|
Subject: [PATCH] SimpleProductSearchHandler: do not crash on empty page field
|
|
|
|
---
|
|
src/oscar/apps/catalogue/search_handlers.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/oscar/apps/catalogue/search_handlers.py b/src/oscar/apps/catalogue/search_handlers.py
|
|
index ed2b62711..a56529bfe 100644
|
|
--- a/src/oscar/apps/catalogue/search_handlers.py
|
|
+++ b/src/oscar/apps/catalogue/search_handlers.py
|
|
@@ -90,7 +90,7 @@ class SimpleProductSearchHandler(MultipleObjectMixin):
|
|
|
|
def __init__(self, request_data, full_path, categories=None):
|
|
self.categories = categories
|
|
- self.kwargs = {'page': request_data.get('page', 1)}
|
|
+ self.kwargs = {'page': request_data.get('page') or 1}
|
|
self.object_list = self.get_queryset()
|
|
|
|
def get_queryset(self):
|
|
--
|
|
2.30.2
|
|
|