From: Moritz Bunkus Date: Mon, 22 Apr 2013 08:48:25 +0000 (+0200) Subject: Überflüssigen before_delete-Hook entfernt X-Git-Tag: release-3.2.0beta~467^2~189 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7d66fb875d0efcbab54c46a526a5ce44ad4389e8;p=kivitendo-erp.git Überflüssigen before_delete-Hook entfernt --- 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) = @_;