Merge branch '18635-remove-unnecesary-.psql-management'
[arvados.git] / services / api / lib / whitelist_update.rb
index 039d98347668ab416b26a6bebb68c753c37c514b..17aed4b48dba66b079431007408dae49ee6442cf 100644 (file)
@@ -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