posts: fix expunging posts not removing image from iqdb.

`File.exists?(preview_file_path)` is always false because the file has
already been deleted by this point. Remove the check entirely.
This commit is contained in:
evazion
2017-06-14 20:07:38 -05:00
parent b27f98dc58
commit d84feaa4bb
3 changed files with 11 additions and 3 deletions

View File

@@ -1713,9 +1713,7 @@ class Post < ActiveRecord::Base
end
def remove_iqdb_async
if File.exists?(preview_file_path) && Post.iqdb_enabled?
Post.iqdb_sqs_service.send_message("remove\n#{id}")
end
Post.remove_iqdb(id)
end
def update_iqdb