From 22dc17dbae3ac2ab60b30e064cbc2ca43c91ff74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 12 Apr 2017 12:50:49 +0200 Subject: [PATCH] CsvImport: Mulitplex: handle_cvars-Routine verlassen, wenn Objekt keine CVars kann --- SL/Controller/CsvImport/BaseMulti.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SL/Controller/CsvImport/BaseMulti.pm b/SL/Controller/CsvImport/BaseMulti.pm index 5168ae28c..2632722ad 100644 --- a/SL/Controller/CsvImport/BaseMulti.pm +++ b/SL/Controller/CsvImport/BaseMulti.pm @@ -170,6 +170,7 @@ sub handle_cvars { my ($self, $entry, %params) = @_; return if @{ $entry->{errors} }; + return unless $entry->{object}->can('cvars_by_config'); my %type_to_column = ( text => 'text_value', textfield => 'text_value', @@ -183,7 +184,7 @@ sub handle_cvars { # autovivify all cvars (cvars_by_config will do that for us) my @cvars; - @cvars = @{ $entry->{object}->cvars_by_config } if $entry->{object}->can('cvars_by_config'); + @cvars = @{ $entry->{object}->cvars_by_config }; foreach my $config (@{ $self->cvar_configs_by->{row_ident}->{$entry->{raw_data}->{datatype}} }) { next unless exists $entry->{raw_data}->{ "cvar_" . $config->name }; -- 2.20.1