From e1db744d6abb6e34026c904725b287e91b7905e3 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 28 Nov 2013 12:41:04 +1100 Subject: [PATCH] URGENT: blank string in auto close time was causing stuff to blow up - non mods could not create topics --- lib/topic_creator.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/topic_creator.rb b/lib/topic_creator.rb index 0965683b5e8..684f2e463a6 100644 --- a/lib/topic_creator.rb +++ b/lib/topic_creator.rb @@ -16,7 +16,7 @@ class TopicCreator topic_params = setup @topic = Topic.new(topic_params) - setup_auto_close_time if @opts[:auto_close_time] + setup_auto_close_time if @opts[:auto_close_time].present? process_private_message if @opts[:archetype] == Archetype.private_message save_topic @@ -47,7 +47,6 @@ class TopicCreator else Category.where(name: @opts[:category]).first end - @guardian.ensure_can_create!(Topic,category) topic_params[:category_id] = category.id if category.present? topic_params[:meta_data] = @opts[:meta_data] if @opts[:meta_data].present?