From a7cc517033852a458c943f4235dc6c34a904396a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com>
Date: Thu, 5 May 2022 11:31:08 +0200
Subject: [PATCH] fix #356

---
 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 cc4355371..5c0cebf91 100644
--- a/app/models/communication/website/menu/item.rb
+++ b/app/models/communication/website/menu/item.rb
@@ -122,7 +122,7 @@ class Communication::Website::Menu::Item < ApplicationRecord
   end
 
   def sync_menu
-    menu.sync_with_git if menu
+    menu.sync_with_git if menu && !menu.destroyed?
   end
 
   def siblings
-- 
GitLab