5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 12:16:22 +00:00

fix: encontrar la licencia por el post indexado

This commit is contained in:
f 2023-10-06 10:18:29 -03:00
parent 7df1af2a54
commit 6f9fe8fdbc
No known key found for this signature in database

View file

@ -144,7 +144,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do
return true if site.licencia.custom?
with_all_locales do |locale|
post = site.posts(lang: locale).find_by(layout: 'license')
post = site.indexed_posts(locale: locale).find_by(layout: 'license')&.post
change_licencia(post: post) if post
end.compact.map(&:valid?).all?