From c50f0e5cfa36de68930bb35906c681088bd1ad8b Mon Sep 17 00:00:00 2001 From: loulous27 Date: Mon, 6 Apr 2026 12:49:23 +0200 Subject: [PATCH] Pathlibfix --- photologue/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/photologue/views.py b/photologue/views.py index e2b0793..85833cc 100644 --- a/photologue/views.py +++ b/photologue/views.py @@ -186,7 +186,7 @@ class GalleryDownload(LoginRequiredMixin, DetailView): gallery_year = Path("/photos/" + str(+gallery.date_start.year)) gallery_zip = gallery_year / (gallery.slug + ".zip") - with open(settings.MEDIA_ROOT / gallery_zip, "wb") as zip_bytes: + with open(settings.MEDIA_ROOT + str(gallery_zip), "wb") as zip_bytes: # I hate pathlib zip_file = zipfile.ZipFile(zip_bytes, "w") for photo in gallery.photos.filter(is_public=True): filename = os.path.basename(os.path.normpath(photo.image.path))