From bffe452ba396c78a325ec178fbf54b661d2fae18 Mon Sep 17 00:00:00 2001
From: pabois <pierreandre.boissinot@noesya.coop>
Date: Mon, 7 Feb 2022 12:28:38 +0100
Subject: [PATCH] sync

---
 app/models/communication/website/menu/item.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/models/communication/website/menu/item.rb b/app/models/communication/website/menu/item.rb
index 9fbd01862..2f7f28b15 100644
--- a/app/models/communication/website/menu/item.rb
+++ b/app/models/communication/website/menu/item.rb
@@ -147,7 +147,7 @@ class Communication::Website::Menu::Item < ApplicationRecord
   end
 
   def sync_menu
-    menu.sync_with_git
+    menu.sync_with_git if menu
   end
 
   def siblings
-- 
GitLab