From: Radek Czajka Date: Wed, 23 Dec 2020 11:23:20 +0000 (+0100) Subject: Minor fixes. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/2afff01c99c92f6044d2559a651283ddebb823e7 Minor fixes. --- 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))