Fix silly mistake in dream attachment saving

This commit is contained in:
Kumi 2021-01-06 14:06:48 +01:00
parent 82e7b262e2
commit 4f25fe20df

View file

@ -65,7 +65,7 @@ class DreamCreateView(LoginRequiredMixin, CreateView):
for attachment in form.cleaned_data["uploads"]: for attachment in form.cleaned_data["uploads"]:
dba = DreamMedia(dream=form.instance) 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() dba.save()
return ret return ret