X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5d00ecb0932f86e4d2aced3d9258b96522ef38bd..3c87946740b83f612561f998f7d83586593be830:/services/api/lib/whitelist_update.rb diff --git a/services/api/lib/whitelist_update.rb b/services/api/lib/whitelist_update.rb index 039d983476..17aed4b48d 100644 --- a/services/api/lib/whitelist_update.rb +++ b/services/api/lib/whitelist_update.rb @@ -1,8 +1,12 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module WhitelistUpdate def check_update_whitelist permitted_fields attribute_names.each do |field| if !permitted_fields.include?(field.to_sym) && really_changed(field) - errors.add field, "cannot be modified in this state (#{send(field+"_was").inspect}, #{send(field).inspect})" + errors.add field, "cannot be modified in state '#{self.state}' (#{send(field+"_was").inspect}, #{send(field).inspect})" end end end