ensure order of cache key

pull/7623/head
ulferts 5 years ago
parent a9213a39cc
commit d5ee1a7d20
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 5
      lib/api/v3/work_packages/schema/work_package_schema_representer.rb

@ -302,11 +302,12 @@ module API
end
def form_config_attribute_representation(group)
cache_keys = ['wp_schema_attribute_group', group.key,
cache_keys = ['wp_schema_attribute_group',
group.key,
I18n.locale,
represented.project,
represented.type,
represented.available_custom_fields]
represented.available_custom_fields.sort_by(&:id)]
OpenProject::Cache.fetch(OpenProject::Cache::CacheKey.expand(cache_keys.flatten.compact)) do
::JSON::parse(::API::V3::WorkPackages::Schema::FormConfigurations::AttributeRepresenter

Loading…
Cancel
Save