REFACTOR: Shorten up category param check

Follow up to d1dbafebbc
This commit is contained in:
Blake Erickson 2019-05-09 14:31:04 -06:00
parent 34684af195
commit ccc1e85bf4
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ class TopicCreator
category = find_category
@guardian.ensure_can_create!(Topic, category) unless (@opts[:skip_validations] || @opts[:archetype] == Archetype.private_message)
raise Discourse::NotFound if @opts[:category] && !@opts[:category].blank? && category.nil?
raise Discourse::NotFound if @opts[:category].present? && category.nil?
topic_params[:category_id] = category.id if category.present?