mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
Fix thumbnail generation for album upload view
This commit is contained in:
parent
bf8a2a03ff
commit
494062fbbe
@ -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')
|
||||||
|
Loading…
Reference in New Issue
Block a user