Skip to content

Commit e1db744

Browse files
committed
URGENT: blank string in auto close time was causing stuff to blow up - non mods could not create topics
1 parent 0e9c34f commit e1db744

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/topic_creator.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def create
1616
topic_params = setup
1717
@topic = Topic.new(topic_params)
1818

19-
setup_auto_close_time if @opts[:auto_close_time]
19+
setup_auto_close_time if @opts[:auto_close_time].present?
2020

2121
process_private_message if @opts[:archetype] == Archetype.private_message
2222
save_topic
@@ -47,7 +47,6 @@ def setup
4747
else
4848
Category.where(name: @opts[:category]).first
4949
end
50-
5150
@guardian.ensure_can_create!(Topic,category)
5251
topic_params[:category_id] = category.id if category.present?
5352
topic_params[:meta_data] = @opts[:meta_data] if @opts[:meta_data].present?

0 commit comments

Comments
 (0)