Delete files before changes
This commit is contained in:
parent
102158915a
commit
3d1c50b3ce
@ -223,8 +223,8 @@ class APIImage < ApplicationRecord
|
|||||||
raise(Error, "Attempted to convert to unknown external: #{url}")
|
raise(Error, "Attempted to convert to unknown external: #{url}")
|
||||||
end
|
end
|
||||||
ExternalAPIImage.create!(api_image: self, external_id: external_id, site: type)
|
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!
|
delete_files!
|
||||||
|
update_columns(artists: [], sources: [], width: 0, height: 0, mime_type: "external", file_ext: "external", file_size: 0)
|
||||||
send_converted
|
send_converted
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user