aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2021-04-11 10:36:11 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2021-04-11 10:39:12 +0300
commitcea9a17f27111d58f75e48fe58181cd7a6641c97 (patch)
tree4168ff20eed2a63fb4a8440f4c6905fa16c97425
parentbc220ed7a8797fd940cc3869be3c8f682296f73a (diff)
downloadaports-cea9a17f27111d58f75e48fe58181cd7a6641c97.tar.gz
aports-cea9a17f27111d58f75e48fe58181cd7a6641c97.tar.bz2
aports-cea9a17f27111d58f75e48fe58181cd7a6641c97.tar.xz
community/py3-django-oscar: crash fix
-rw-r--r--community/py3-django-oscar/0001-SimpleProductSearchHandler-do-not-crash-on-empty-pag.patch25
-rw-r--r--community/py3-django-oscar/APKBUILD4
2 files changed, 28 insertions, 1 deletions
diff --git a/community/py3-django-oscar/0001-SimpleProductSearchHandler-do-not-crash-on-empty-pag.patch b/community/py3-django-oscar/0001-SimpleProductSearchHandler-do-not-crash-on-empty-pag.patch
new file mode 100644
index 0000000000..bf42703c8d
--- /dev/null
+++ b/community/py3-django-oscar/0001-SimpleProductSearchHandler-do-not-crash-on-empty-pag.patch
@@ -0,0 +1,25 @@
+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
+
diff --git a/community/py3-django-oscar/APKBUILD b/community/py3-django-oscar/APKBUILD
index 232f777e8f..f1d64d6e08 100644
--- a/community/py3-django-oscar/APKBUILD
+++ b/community/py3-django-oscar/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=py3-django-oscar
pkgver=2.1
-pkgrel=2
+pkgrel=3
pkgdesc="Domain-driven e-commerce for Django"
url="http://oscarcommerce.com/"
arch="noarch"
@@ -13,6 +13,7 @@ depends="py3-babel py3-django py3-django-extra-views py3-django-haystack
py3-factory-boy py3-pillow py3-purl"
makedepends="gettext py3-setuptools"
source="https://files.pythonhosted.org/packages/source/d/django-oscar/django-oscar-$pkgver.tar.gz
+ 0001-SimpleProductSearchHandler-do-not-crash-on-empty-pag.patch
django-3.1.patch
translation.patch
"
@@ -39,5 +40,6 @@ package() {
}
sha512sums="b8279eadb637fec4d9979d037fd86c61e16c3a9be518158cc14505200a8b30d1226ac17da6535a724d3f4e71789dab5b7a3583c28c6d6f8480db66a994568ed2 django-oscar-2.1.tar.gz
+bc7ca2cc88d119fe366415531ea09a78df3e242223edea00ede56f77efd7628010fc21237ba7ec6cfc9f7e1ea0c70e8f84ed5363bd6d7ec3b3a68c91da469ea5 0001-SimpleProductSearchHandler-do-not-crash-on-empty-pag.patch
b08eaf7510d87cd1e7c904b35fcb156ffa5e063da4af93e540b0ba580709fd8dc6b98fb27db4ea8e57711a4f3d404b145524fcb9bf6a23a58886d7b7b071e2f5 django-3.1.patch
8c49764a5aa44b8c3309f673a3c6f43da1a545cca10e02c8a8868d350b0012c938b9436ab8d20b50e012cfec872af482f7b35d2d5f5ac557f1286224f4704a9e translation.patch"