refactor Picture.generate_thumbnails

This commit is contained in:
imperosol
2026-05-01 18:00:22 +02:00
parent 060dde78e7
commit 9d3d3ea005
4 changed files with 40 additions and 54 deletions
+1 -2
View File
@@ -126,9 +126,8 @@ class PicturesController(ControllerBase):
if self_moderate:
new.moderator = user
try:
new.generate_thumbnails()
new.full_clean()
new.save()
new.generate_thumbnails(save=True)
except ValidationError as e:
return self.create_response({"detail": dict(e)}, status_code=409)