From e88a993d4f64ac3740127f3575c9d7e13b91582c Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 17 Jul 2026 14:10:55 +0200 Subject: [PATCH 1/3] Fix #4202 --- app/models/communication/website/git_file.rb | 3 ++- app/models/communication/website/menu.rb | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/communication/website/git_file.rb b/app/models/communication/website/git_file.rb index 441f88983..3ff992360 100644 --- a/app/models/communication/website/git_file.rb +++ b/app/models/communication/website/git_file.rb @@ -83,7 +83,8 @@ def analyze! def mark_for_update! update( desynchronized: true, - desynchronized_at: Time.zone.now + desynchronized_at: Time.zone.now, + current_sha: nil ) end diff --git a/app/models/communication/website/menu.rb b/app/models/communication/website/menu.rb index 62c62a680..95a33f94a 100644 --- a/app/models/communication/website/menu.rb +++ b/app/models/communication/website/menu.rb @@ -61,7 +61,9 @@ def git_path(website) end def should_sync_to?(website) - website.id == communication_website_id && website.active_language_ids.include?(language_id) && items.any? + website.id == communication_website_id && + website.active_language_ids.include?(language_id) && + items.any? end def template_static From 546ec3164245ac214c30973a0fbe643a72b011de Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 17 Jul 2026 14:28:35 +0200 Subject: [PATCH 2/3] nope --- app/models/communication/website/git_file.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/communication/website/git_file.rb b/app/models/communication/website/git_file.rb index 3ff992360..441f88983 100644 --- a/app/models/communication/website/git_file.rb +++ b/app/models/communication/website/git_file.rb @@ -83,8 +83,7 @@ def analyze! def mark_for_update! update( desynchronized: true, - desynchronized_at: Time.zone.now, - current_sha: nil + desynchronized_at: Time.zone.now ) end From 60390261767fa6c574f10326fc7be33a5bc11acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= Date: Fri, 17 Jul 2026 14:41:55 +0200 Subject: [PATCH 3/3] analyze! instead of mark_for_update! --- app/controllers/admin/communication/blocks_controller.rb | 2 +- app/models/communication/website/git_file.rb | 7 ------- app/models/concerns/has_git_files.rb | 4 ++-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/controllers/admin/communication/blocks_controller.rb b/app/controllers/admin/communication/blocks_controller.rb index 5c98685ca..a398ccd7d 100644 --- a/app/controllers/admin/communication/blocks_controller.rb +++ b/app/controllers/admin/communication/blocks_controller.rb @@ -13,7 +13,7 @@ def reorder block.update_column(:position, index + 1) about ||= block.about # Always the same about, doesn't matter end - about.try(:mark_git_files_for_update!) + about.try(:analyze_git_files!) end def new diff --git a/app/models/communication/website/git_file.rb b/app/models/communication/website/git_file.rb index 441f88983..9a7650bcc 100644 --- a/app/models/communication/website/git_file.rb +++ b/app/models/communication/website/git_file.rb @@ -80,13 +80,6 @@ def analyze! end end - def mark_for_update! - update( - desynchronized: true, - desynchronized_at: Time.zone.now - ) - end - def mark_for_destruction! return if current_path.nil? && current_sha.nil? now = Time.zone.now diff --git a/app/models/concerns/has_git_files.rb b/app/models/concerns/has_git_files.rb index 2ecdf8f6a..633fd9f02 100644 --- a/app/models/concerns/has_git_files.rb +++ b/app/models/concerns/has_git_files.rb @@ -30,8 +30,8 @@ def git_path_content_prefix(website) path end - def mark_git_files_for_update! - git_files.each &:mark_for_update! + def analyze_git_files! + git_files.each &:analyze! end end