From 7d66fb875d0efcbab54c46a526a5ce44ad4389e8 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 22 Apr 2013 10:48:25 +0200 Subject: [PATCH] =?utf8?q?=C3=9Cberfl=C3=BCssigen=20before=5Fdelete-Hook?= =?utf8?q?=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/RequirementSpecItem.pm | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/SL/DB/RequirementSpecItem.pm b/SL/DB/RequirementSpecItem.pm index 5ea599f89..69265537c 100644 --- a/SL/DB/RequirementSpecItem.pm +++ b/SL/DB/RequirementSpecItem.pm @@ -42,20 +42,8 @@ __PACKAGE__->attr_duration(qw(time_estimation)); __PACKAGE__->before_save(\&_before_save_create_fb_number); __PACKAGE__->before_save(\ &_before_save_invalidate_requirement_spec_version); -__PACKAGE__->before_delete(\&_before_delete_delete_children); __PACKAGE__->before_delete(\&_before_delete_invalidate_requirement_spec_version); -sub _before_delete_delete_children { - my ($self) = @_; - - foreach my $child (@{ SL::DB::Manager::RequirementSpecItem->get_all(where => [ parent_id => $self->id ]) }) { - my $result = $child->delete; - return $result if !$result; - } - - 1; -} - sub _before_save_create_fb_number { my ($self) = @_; -- 2.20.1