X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a8bf5ded794ad2b59e65d8a681b79d727f899402..45da0e8226577f64ec397f0af03e6a46fc8cb386:/services/api/app/controllers/arvados/v1/keep_disks_controller.rb diff --git a/services/api/app/controllers/arvados/v1/keep_disks_controller.rb b/services/api/app/controllers/arvados/v1/keep_disks_controller.rb index 2f38cb57e5..31327ad93b 100644 --- a/services/api/app/controllers/arvados/v1/keep_disks_controller.rb +++ b/services/api/app/controllers/arvados/v1/keep_disks_controller.rb @@ -14,13 +14,8 @@ class Arvados::V1::KeepDisksController < ApplicationController end def ping if !@object - if params[:filesystem_uuid].andand.length.andand > 0 and - current_user.andand.is_admin - @object = KeepDisk. - find_or_initialize_by_filesystem_uuid params[:filesystem_uuid] - if not @object.new_record? - raise "ping from keep_disk with existing filesystem_uuid #{params[:filesystem_uuid]} but wrong uuid #{params[:uuid]}" - end + if current_user.andand.is_admin + @object = KeepDisk.new(filesystem_uuid: params[:filesystem_uuid]) @object.save! # In the first ping from this new filesystem_uuid, we can't