* Fix for Pixiv changes
* Fix for artist/wiki pages for -names
This commit is contained in:
@@ -171,13 +171,17 @@ class Artist < ActiveRecord::Base
|
||||
|
||||
def ban!
|
||||
Post.transaction do
|
||||
Post.tag_match(name).each do |post|
|
||||
begin
|
||||
post.flag!("Artist requested removal")
|
||||
rescue PostFlag::Error
|
||||
# swallow
|
||||
begin
|
||||
Post.tag_match(name).each do |post|
|
||||
begin
|
||||
post.flag!("Artist requested removal")
|
||||
rescue PostFlag::Error
|
||||
# swallow
|
||||
end
|
||||
post.delete!
|
||||
end
|
||||
post.delete!
|
||||
rescue Post::SearchError
|
||||
# swallow
|
||||
end
|
||||
|
||||
# potential race condition but unlikely
|
||||
|
||||
@@ -659,6 +659,8 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
count
|
||||
rescue SearchError
|
||||
0
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user