mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:23:25 +08:00
FIX: Bulk deleting topics should ignore already deleted topics
This commit is contained in:
parent
c358421ca5
commit
2927294cc6
|
@ -136,7 +136,8 @@ class TopicsBulkAction
|
|||
def delete
|
||||
topics.each do |t|
|
||||
if guardian.can_delete?(t)
|
||||
PostDestroyer.new(@user, t.ordered_posts.first).destroy
|
||||
post = t.ordered_posts.first
|
||||
PostDestroyer.new(@user, post).destroy if post
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -166,7 +167,7 @@ class TopicsBulkAction
|
|||
if tags.present?
|
||||
DiscourseTagging.tag_topic_by_names(t, guardian, tags, append: true)
|
||||
end
|
||||
@changed_ids << t.id
|
||||
@changed_ids << t.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user