refactor Picture.generate_thumbnails

This commit is contained in:
imperosol committed 2026-05-01 23:15:11 +02:00
1 parent 060dde78e7
commit 441a016025
4 files changed
+40 -54

No files matched your search

+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)