mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Unable to move pm to public topic (#24903)
* FIX: guard against empty category_ids when creating small action post for changing of category Co-authored-by: Kelvin Tan <kelv@discourse.org>
This commit is contained in:
@@ -154,7 +154,9 @@ class PostRevisor
|
||||
end
|
||||
|
||||
def self.create_small_action_for_category_change(topic:, user:, old_category:, new_category:)
|
||||
return if !SiteSetting.create_post_for_category_and_tag_changes
|
||||
if !old_category || !new_category || !SiteSetting.create_post_for_category_and_tag_changes
|
||||
return
|
||||
end
|
||||
|
||||
topic.add_moderator_post(
|
||||
user,
|
||||
|
||||
Reference in New Issue
Block a user