From: Radek Czajka Date: Fri, 23 Sep 2022 13:41:53 +0000 (+0200) Subject: Cover quick import fix. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/24ae804e7a88a17dcefd0e671eb08e548de14ae8 Cover quick import fix. --- diff --git a/src/cover/views.py b/src/cover/views.py index 638f1c06..25663a09 100644 --- a/src/cover/views.py +++ b/src/cover/views.py @@ -158,7 +158,7 @@ def quick_import(request, pk): if url.startswith('%s://%s/' % ( request.scheme, request.get_host())): - cover_id = url.rsplit('/', 1)[-1] + cover_id = url.rstrip('/').rsplit('/', 1)[-1] cover = Image.objects.get(pk=cover_id) else: data = get_import_data(url)