From 515401c1c43f4467cbcd5af001aa95988f0ea130 Mon Sep 17 00:00:00 2001
From: pabois <pierreandre.boissinot@noesya.coop>
Date: Mon, 5 Dec 2022 15:52:28 +0100
Subject: [PATCH] doc

---
 app/models/communication/website/git_file.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/models/communication/website/git_file.rb b/app/models/communication/website/git_file.rb
index 996b1edc2..8546aa661 100644
--- a/app/models/communication/website/git_file.rb
+++ b/app/models/communication/website/git_file.rb
@@ -27,6 +27,7 @@ class Communication::Website::GitFile < ApplicationRecord
   attr_accessor :will_be_destroyed
 
   def self.sync(website, object, destroy: false)
+    # Permalinks must be calculated BEFORE renders
     object.manage_permalink_in_website(website) if Communication::Website::Permalink::MAPPING.keys.include?(object.class.to_s)
     object.before_git_sync # Handle optional before-sync process
     git_file = where(website: website, about: object).first_or_create
-- 
GitLab