From 2afff01c99c92f6044d2559a651283ddebb823e7 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 23 Dec 2020 12:23:20 +0100 Subject: [PATCH 1/1] Minor fixes. --- src/catalogue/fields.py | 2 +- src/stats/tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/catalogue/fields.py b/src/catalogue/fields.py index 52a6d1b17..4d49d3080 100644 --- a/src/catalogue/fields.py +++ b/src/catalogue/fields.py @@ -313,7 +313,7 @@ class BuildHtml(BuildEbook): if url_elem is None: gallery = '' else: - gallery = gallery_url(slug=url_elem.text.rsplit('/', 1)[1]) + gallery = gallery_url(slug=url_elem.text.rstrip('/').rsplit('/', 1)[1]) return wldoc.as_html(options={'gallery': "'%s'" % gallery}) diff --git a/src/stats/tasks.py b/src/stats/tasks.py index 7c9dc9666..21f2470cc 100644 --- a/src/stats/tasks.py +++ b/src/stats/tasks.py @@ -23,4 +23,4 @@ except AttributeError: @task(ignore_result=True) def track_request(piwik_args): - urlopen("https:%s%s%s" % (settings.PIWIK_URL, "piwik.php?", piwik_args)) + urlopen("%s%s%s" % (settings.PIWIK_URL, "piwik.php?", piwik_args)) -- 2.20.1