diff --git a/app/models/education/diploma.rb b/app/models/education/diploma.rb index dc0913ddd905e2dedf1396c3abc34f33fc27733a..8b2c7b9ef910b57659d92798078bff6bb64c7329 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) }