镜像问题

dev_aliyun_beta
daiao 6 years ago
parent 04cd21345d
commit f229346cb8

@ -424,7 +424,11 @@ class ShixunsController < ApplicationController
if current_user.admin? || current_user.business?
@shixun.shixun_service_configs.destroy_all
logger.info("######service_config_params[:shixun_service_configs]:#{service_config_params[:shixun_service_configs]}")
@shixun.shixun_service_configs.create!(service_config_params[:shixun_service_configs])
service_config_params[:shixun_service_configs].each do |config|
name = MirrorRepository.find_by_id(config[:mirror_repository_id])&.name
# 不保存没有镜像的配置
@shixun.shixun_service_configs.create!(config) if name.present?
end
end
rescue Exception => e
uid_logger_error(e.message)

Loading…
Cancel
Save