From 720232a8dbf4c4e38271d4e19cf80b9cf77f9549 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Thu, 28 Mar 2024 13:45:42 +0100 Subject: [PATCH] Remove obsolete callback on RepositoryChecklistItemsValue [SCI-10551] --- app/models/repository_checklist_items_value.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/models/repository_checklist_items_value.rb b/app/models/repository_checklist_items_value.rb index 07766f933..4ce8b0b58 100644 --- a/app/models/repository_checklist_items_value.rb +++ b/app/models/repository_checklist_items_value.rb @@ -5,10 +5,4 @@ class RepositoryChecklistItemsValue < ApplicationRecord belongs_to :repository_checklist_value, inverse_of: :repository_checklist_items_values validates :repository_checklist_item, :repository_checklist_value, presence: true - - after_destroy :destroy_empty_value - - def destroy_empty_value - repository_checklist_value.destroy! if repository_checklist_value.repository_checklist_items_values.blank? - end end