diff --git a/app/models/metadata_related_posts.rb b/app/models/metadata_related_posts.rb index 50b8660e..a9aaaa21 100644 --- a/app/models/metadata_related_posts.rb +++ b/app/models/metadata_related_posts.rb @@ -34,14 +34,14 @@ class MetadataRelatedPosts < MetadataArray # # @return [IndexedPost::ActiveRecord_AssociationRelation] def posts - site.indexed_posts.where(locale: locale).where.not(post_id: post.uuid.value).where(**filter) + site.indexed_posts.where(locale: locale).where.not(post_id: post.uuid.value).where(filter) end # Encuentra el filtro desde el esquema del atributo # - # @return [Hash] + # @return [Hash,nil] def filter - layout.metadata.dig(name, 'filter')&.to_h&.symbolize_keys || {} + layout.metadata.dig(name, 'filter')&.to_h&.symbolize_keys end def sanitize(uuid)