Anzahl nicht importierter Objekte richtig anzeigen, sofern == 0
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 2 Nov 2011 16:34:57 +0000 (17:34 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 2 Nov 2011 16:34:57 +0000 (17:34 +0100)
SL/Controller/CsvImport.pm

index c30634b..9cca6cd 100644 (file)
@@ -168,6 +168,8 @@ sub test_and_import {
 
   my $worker = $self->create_worker($file);
   $worker->run;
+
+  $self->num_imported(0);
   $worker->save_objects if !$params{test};
 
   $self->num_importable(scalar grep { !$_ } map { scalar @{ $_->{errors} } } @{ $self->data || [] });