Partial fix for #1520
This commit is contained in:
@@ -207,12 +207,7 @@ class Artist < ActiveRecord::Base
|
||||
CurrentUser.without_safe_mode do
|
||||
begin
|
||||
Post.tag_match(name).each do |post|
|
||||
begin
|
||||
post.flag!("Artist requested removal")
|
||||
rescue PostFlag::Error
|
||||
# swallow
|
||||
end
|
||||
post.delete!(:ban => true)
|
||||
post.ban!
|
||||
end
|
||||
rescue Post::SearchError
|
||||
# swallow
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p style="font-weight: bold;">Note: If the reason you are planning to delete this post is because it is from a banned artist, please <%= link_to "ban", confirm_ban_moderator_post_post_path(@post) %> this post instead of deleting it.</p>
|
||||
|
||||
<div class="input">
|
||||
<label for="reason">Reason</label>
|
||||
<%= text_area_tag "reason" %>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
<ul>
|
||||
<li>Duplicate: just parent to the original</li>
|
||||
<li>Banned artist: request that a member of site staff ban this post instead</li>
|
||||
</ul>
|
||||
|
||||
<p>Enter a reason:</p>
|
||||
|
||||
@@ -41,8 +41,8 @@ class ArtistTest < ActiveSupport::TestCase
|
||||
assert(@post.is_banned?)
|
||||
end
|
||||
|
||||
should "delete the post" do
|
||||
assert(@post.is_deleted?)
|
||||
should "not delete the post" do
|
||||
refute(@post.is_deleted?)
|
||||
end
|
||||
|
||||
should "create a new tag implication" do
|
||||
|
||||
Reference in New Issue
Block a user