diff --git a/app/services/site_service.rb b/app/services/site_service.rb index 7022244c..9d748f8f 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -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?