mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
Fix regression on editing private messages
v1.2.0beta9 has introduced a regression in edit of a private topic (first post). Previously a check for no change in TopicsController was made but it has been changed without considering that the topic could be private. By simply forcing a conversion of `topic.category_id` to integer, the case where its value is nil is handled correctly as it was previously.
This commit is contained in:
@ -133,7 +133,7 @@ class TopicsController < ApplicationController
|
||||
end
|
||||
|
||||
changes.delete(:title) if topic.title == changes[:title]
|
||||
changes.delete(:category_id) if topic.category_id == changes[:category_id].to_i
|
||||
changes.delete(:category_id) if topic.category_id.to_i == changes[:category_id].to_i
|
||||
|
||||
success = true
|
||||
if changes.length > 0
|
||||
|
Reference in New Issue
Block a user