From 29be4b26b034ee7e2a78413e9c8dbd6278266fc8 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 5 Apr 2023 19:30:44 -0300 Subject: [PATCH] fix: no producir un error al no haber locales --- app/models/metadata_locales.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/metadata_locales.rb b/app/models/metadata_locales.rb index 3790b944..37b50286 100644 --- a/app/models/metadata_locales.rb +++ b/app/models/metadata_locales.rb @@ -44,6 +44,6 @@ class MetadataLocales < MetadataHasAndBelongsToMany def posts other_locales.map do |locale| site.posts(lang: locale).where(layout: post.layout.value) - end.reduce(&:concat) || PostRelation.new + end.reduce(&:concat) || PostRelation.new(site: site, lang: 'any') end end