5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 15:21:41 +00:00

fix: no producir un error al no haber locales

This commit is contained in:
f 2023-04-05 19:30:44 -03:00
parent b51eb6856c
commit 29be4b26b0

View file

@ -44,6 +44,6 @@ class MetadataLocales < MetadataHasAndBelongsToMany
def posts def posts
other_locales.map do |locale| other_locales.map do |locale|
site.posts(lang: locale).where(layout: post.layout.value) 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
end end