mark image as generating thumbnails when replaced or repaired

This commit is contained in:
byte[] 2019-12-30 18:34:59 -05:00
parent 982adb9ba5
commit 31b1704847

View file

@ -159,6 +159,10 @@ defmodule Philomena.Images do
end
def repair_image(%Image{} = image) do
Image
|> where(id: ^image.id)
|> Repo.update_all(set: [thumbnails_generated: false, processed: false])
Philomena.Images.Thumbnailer.generate_thumbnails(image.id)
end