From 4f25fe20df660c4c4c6d555e47f76678f6ed795e Mon Sep 17 00:00:00 2001 From: Kumi Date: Wed, 6 Jan 2021 14:06:48 +0100 Subject: [PATCH] Fix silly mistake in dream attachment saving --- dreams/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dreams/views.py b/dreams/views.py index 423bd07..bcf46f9 100644 --- a/dreams/views.py +++ b/dreams/views.py @@ -65,7 +65,7 @@ class DreamCreateView(LoginRequiredMixin, CreateView): for attachment in form.cleaned_data["uploads"]: dba = DreamMedia(dream=form.instance) - dba.media.save(get_upload_path(form.instance, dba.media.name), attachment) + dba.media.save(get_upload_path(form.instance, attachment.name), attachment) dba.save() return ret