allow views to be specified in import mode

This commit is contained in:
Sam
2015-07-16 16:11:20 +10:00
parent bfd28ca9a9
commit 5db345705b
2 changed files with 11 additions and 6 deletions

View File

@@ -73,6 +73,10 @@ class TopicCreator
topic_params[key] = @opts[key] if @opts[key].present?
end
if topic_params[:import_mode] && @opts[:views].to_i > 0
topic_params[:views] = @opts[:views].to_i
end
# Automatically give it a moderator warning subtype if specified
topic_params[:subtype] = TopicSubtype.moderator_warning if @opts[:is_warning]