diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 71a214062..ca6b38360 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -132,7 +132,7 @@ class ProjectsController < ApplicationController # TODO: # 临时特殊处理修改website、lesson_url操作方法 if project_params.has_key?("website") - if params[:project_topic_names].present? && params[:project_topic_names].is_a?(Array) + if params[:project_topic_names].is_a?(Array) ProjectTopicRalate.where(project: @project).destroy_all params[:project_topic_names].each do |name| project_topic = ProjectTopic.find_or_create_by!(name: name.downcase)