diff --git a/app/models/client.rb b/app/models/client.rb index c10a48db0..a166e7558 100644 --- a/app/models/client.rb +++ b/app/models/client.rb @@ -157,7 +157,7 @@ def repository_id=(value) end def repository - cached_repository_response(re3data) if re3data.present? + OpenStruct.new(cached_repository_response(re3data)) if re3data.present? end def target_id=(value) diff --git a/app/serializers/client_serializer.rb b/app/serializers/client_serializer.rb index d4fc1429b..ea09c420f 100644 --- a/app/serializers/client_serializer.rb +++ b/app/serializers/client_serializer.rb @@ -3,7 +3,7 @@ class ClientSerializer set_key_transform :dash set_type :clients set_id :uid - #cache_options enabled: true, cache_length: 24.hours + cache_options enabled: true, cache_length: 24.hours attributes :name, :symbol, :year, :contact_name, :contact_email, :domains, :url, :created, :updated diff --git a/app/serializers/repository_serializer.rb b/app/serializers/repository_serializer.rb index 65a80d7a8..d8c932e68 100644 --- a/app/serializers/repository_serializer.rb +++ b/app/serializers/repository_serializer.rb @@ -2,7 +2,7 @@ class RepositorySerializer include FastJsonapi::ObjectSerializer set_key_transform :dash set_type :repositories - #cache_options enabled: true, cache_length: 24.hours + cache_options enabled: true, cache_length: 24.hours attributes :repository_name, :repository_url, :repository_contacts, :description, :certificates, :types, :additional_names, :subjects, :content_types, :provider_types,