From: Bernd Bleßmann Date: Tue, 11 Apr 2017 19:07:17 +0000 (+0200) Subject: CsvImport: handle_cvars: CVars für das zu speichernde Objekt setzen. X-Git-Tag: kivitendo-mebil_0.1-0~9^2~385 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=141b5c0ab7bb381fdf4209e4e9df117e6e5afed7;p=kivitendo-erp.git CsvImport: handle_cvars: CVars für das zu speichernde Objekt setzen. --- diff --git a/SL/Controller/CsvImport/Base.pm b/SL/Controller/CsvImport/Base.pm index 663be5eb8..4d7df747a 100644 --- a/SL/Controller/CsvImport/Base.pm +++ b/SL/Controller/CsvImport/Base.pm @@ -311,14 +311,15 @@ sub handle_cvars { # merge existing with new cvars. swap every existing with the imported one, push the rest if (@cvars) { - my @orig_cvars = ($entry->{object_to_save} || $entry->{object})->custom_variables; + my $object = $entry->{object_to_save} || $entry->{object}; + my @orig_cvars = $object->custom_variables; for (@orig_cvars) { $_ = $changed_cvars{ $_->config->name } if $changed_cvars{ $_->config->name }; delete $changed_cvars{ $_->config->name }; } push @orig_cvars, values %changed_cvars; - $entry->{object}->custom_variables(\@orig_cvars); + $object->custom_variables(\@orig_cvars); } }