Fix thumbnail generation for album upload view

This commit is contained in:
Skia 2017-02-02 23:07:45 +01:00
parent bf8a2a03ff
commit 494062fbbe

View File

@ -157,6 +157,8 @@ class AlbumUploadView(CanViewMixin, DetailView, FormMixin):
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
self.object = self.get_object() self.object = self.get_object()
if not self.object.file:
self.object.generate_thumbnail()
self.form = self.get_form() self.form = self.get_form()
parent = SithFile.objects.filter(id=self.object.id).first() parent = SithFile.objects.filter(id=self.object.id).first()
files = request.FILES.getlist('images') files = request.FILES.getlist('images')