Überflüssigen before_delete-Hook entfernt
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 22 Apr 2013 08:48:25 +0000 (10:48 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 1 Apr 2014 11:03:19 +0000 (13:03 +0200)
SL/DB/RequirementSpecItem.pm

index 5ea599f..6926553 100644 (file)
@@ -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) = @_;