X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FRequirementSpecPart.pm;h=57cfb49b3e829bd82fa7f85a03eed7f94fef3bb1;hb=5e55cce6abaf16fb9425bcdc5a669eaaddca3319;hp=b9df7f545dcfd58d5f0e0a76d0b13f078b41449e;hpb=89360aadb2c3e0854a2815e5d0ed8a9efd1c5889;p=kivitendo-erp.git diff --git a/SL/Controller/RequirementSpecPart.pm b/SL/Controller/RequirementSpecPart.pm index b9df7f545..57cfb49b3 100644 --- a/SL/Controller/RequirementSpecPart.pm +++ b/SL/Controller/RequirementSpecPart.pm @@ -73,7 +73,7 @@ sub action_ajax_save { my ($self) = @_; my $db = $self->requirement_spec->db; - $db->do_transaction(sub { + $db->with_transaction(sub { # Make Emacs happy 1; my $parts = $::form->{additional_parts} || []; @@ -81,8 +81,6 @@ sub action_ajax_save { $_->{position} = $position++ for @{ $parts }; $self->requirement_spec->update_attributes(parts => $parts)->load; - - 1; }) or do { return $self->js->error(t8('Saving failed. Error message from the database: #1', $db->error))->render; };