X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FCsvImport%2FBaseMulti.pm;h=2632722adf41e4f762019663decfa8d5012d8b35;hb=66887b8351ab22723c46f1a905e6df3cf30aac3c;hp=5168ae28c8c0edbd8ca736e1910c20ec947d760b;hpb=9f4ef62c42dceef5a27ad3a0d8c8d260ffef9848;p=kivitendo-erp.git 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 };