X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FCustomVariableConfig.pm;h=1b780e5fc0441ef78616639b825bceb6e7508bd7;hb=a6ce2c7f3f7ae10f7065fb86121c8d11049617ee;hp=e0b587c33b6955f78254561c93e99118558d5e6f;hpb=040b466d09c01e86a65dca2c04aadcda22af3e7b;p=kivitendo-erp.git diff --git a/SL/Controller/CustomVariableConfig.pm b/SL/Controller/CustomVariableConfig.pm index e0b587c33..1b780e5fc 100644 --- a/SL/Controller/CustomVariableConfig.pm +++ b/SL/Controller/CustomVariableConfig.pm @@ -197,13 +197,13 @@ sub create_or_update { return; } - my $dbh = $self->config->db; - $dbh->begin_work; + SL::DB->client->with_transaction(sub { + my $dbh = SL::DB->client->dbh; - $self->config->save; - $self->_set_cvar_validity() if $is_new; - - $dbh->commit; + $self->config->save; + $self->_set_cvar_validity() if $is_new; + 1; + }) or do { die SL::DB->client->error }; flash_later('info', $is_new ? t8('The custom variable has been created.') : t8('The custom variable has been saved.')); $self->redirect_to(action => 'list', module => $self->module);