Skip to content

A platform for community discussion. Free, open, simple.

DEV: Better custom field preload error (#11044)

Mark VanLandingham554a617b3d54
diff --git a/app/models/concerns/has_custom_fields.rb b/app/models/concerns/has_custom_fields.rb
index ca8d6df23e6..ee1eedb9f1d 100644
--- a/app/models/concerns/has_custom_fields.rb
+++ b/app/models/concerns/has_custom_fields.rb
@@ -165,7 +165,7 @@ module HasCustomFields
@preloaded[key]
else
# for now you can not mix preload an non preload, it better just to fail
- raise StandardError, "Attempting to access a non preloaded custom field, this is disallowed to prevent N+1 queries."
+ raise StandardError, "Attempted to access the non preloaded custom field '#{key}'. This is disallowed to prevent N+1 queries."
end
end
end