Delete files before changes

This commit is contained in:
Donovan Daniels 2024-10-21 18:09:37 -05:00
parent 102158915a
commit 3d1c50b3ce
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA

View File

@ -223,8 +223,8 @@ class APIImage < ApplicationRecord
raise(Error, "Attempted to convert to unknown external: #{url}")
end
ExternalAPIImage.create!(api_image: self, external_id: external_id, site: type)
update_columns(artists: [], sources: [], width: 0, height: 0, mime_type: "external", file_ext: "external", file_size: 0)
delete_files!
update_columns(artists: [], sources: [], width: 0, height: 0, mime_type: "external", file_ext: "external", file_size: 0)
send_converted
end
end