2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

Improve validation for TopicStatusUpdate.

This commit is contained in:
Guo Xiang Tan 2017-04-07 15:26:15 +08:00
parent cd59db5aa3
commit 71501feaf3
3 changed files with 35 additions and 1 deletions

View file

@ -969,7 +969,7 @@ SQL
topic_status_update.based_on_last_post = !based_on_last_post.blank?
if status_type == TopicStatusUpdate.types[:publish_to_category]
topic_status_update.category_id = category_id
topic_status_update.category = Category.find_by(category_id)
end
if topic_status_update.based_on_last_post