From 141b5c0ab7bb381fdf4209e4e9df117e6e5afed7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 11 Apr 2017 21:07:17 +0200 Subject: [PATCH] =?utf8?q?CsvImport:=20handle=5Fcvars:=20CVars=20f=C3=BCr?= =?utf8?q?=20das=20zu=20speichernde=20Objekt=20setzen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/CsvImport/Base.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } } -- 2.39.5