X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/d41efcfe571f88b63aa53492e3e3460d948232d6..ae278b58747710a8c843a6bee9375186eafa17f7:/SL/Controller/RequirementSpecTextBlock.pm diff --git a/SL/Controller/RequirementSpecTextBlock.pm b/SL/Controller/RequirementSpecTextBlock.pm index 264b83b5a..055281907 100644 --- a/SL/Controller/RequirementSpecTextBlock.pm +++ b/SL/Controller/RequirementSpecTextBlock.pm @@ -184,7 +184,7 @@ sub action_dragged_and_dropped { my $dropped_type = $position ne 'last' ? undef : $::form->{dropped_type} =~ m/^ text-blocks- (?:front|back) $/x ? $::form->{dropped_type} : die "Unknown 'dropped_type' parameter"; my $old_where = $self->text_block->output_position; - $self->text_block->db->do_transaction(sub { + $self->text_block->db->with_transaction(sub { 1; $self->text_block->remove_from_list; $self->text_block->output_position($position =~ m/before|after/ ? $dropped_text_block->output_position : $::form->{dropped_type} eq 'text-blocks-front' ? 0 : 1); @@ -482,7 +482,7 @@ sub show_list { sub paste_picture { my ($self, $copied) = @_; - if (!$self->text_block->db->do_transaction(sub { + if (!$self->text_block->db->with_transaction(sub { 1; $self->picture($copied->to_object)->save; # Create new picture from copied data and save $self->text_block->add_pictures($self->picture); # Add new picture to text block