From e8db47a1fe7ec905f07a9118adc27392fd99f24e Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Thu, 29 Jan 2015 15:00:11 +0530 Subject: [PATCH] FIX: PMs were not allowed to be edited in some cases --- app/controllers/topics_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index c2f9be7c6..0bcda12ca 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -131,7 +131,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 (changes[:category_id].empty? or topic.category_id == changes[:category_id].to_i) success = true if changes.length > 0