Minor fixes.
authorRadek Czajka <rczajka@rczajka.pl>
Wed, 23 Dec 2020 11:23:20 +0000 (12:23 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Wed, 23 Dec 2020 11:23:20 +0000 (12:23 +0100)
src/catalogue/fields.py
src/stats/tasks.py

index 52a6d1b..4d49d30 100644 (file)
@@ -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})
 
 
index 7c9dc96..21f2470 100644 (file)
@@ -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))