From: Bernd Bleßmann Date: Wed, 12 Apr 2017 10:50:49 +0000 (+0200) Subject: CsvImport: Mulitplex: handle_cvars-Routine verlassen, wenn Objekt keine CVars kann X-Git-Tag: kivitendo-mebil_0.1-0~9^2~380 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=22dc17dbae3ac2ab60b30e064cbc2ca43c91ff74;p=kivitendo-erp.git CsvImport: Mulitplex: handle_cvars-Routine verlassen, wenn Objekt keine CVars kann --- 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 };