From 3cbc5f11e72aba107bd302df16251c7581ee7d61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com>
Date: Mon, 16 May 2022 12:20:59 +0200
Subject: [PATCH] diploma has many programs (dependent nullify)

---
 app/models/education/diploma.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/models/education/diploma.rb b/app/models/education/diploma.rb
index dc0913ddd..8b2c7b9ef 100644
--- a/app/models/education/diploma.rb
+++ b/app/models/education/diploma.rb
@@ -24,7 +24,7 @@ class Education::Diploma < ApplicationRecord
   include WithGit
   include WithSlug
 
-  has_many :programs
+  has_many :programs, dependent: :nullify
 
   scope :ordered, -> { order(:level, :name) }
 
-- 
GitLab