mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 08:13:37 +00:00
fix: siempre devolver una relación #12768
This commit is contained in:
parent
59606f3263
commit
b51eb6856c
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
end.reduce(&:concat) || PostRelation.new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue