CSV-Import: Neu anlegen gefixt
[kivitendo-erp.git] / SL / Controller / CsvImport / Contact.pm
index 5ca2ae8..2eb877e 100644 (file)
@@ -47,7 +47,7 @@ sub check_objects {
     if ($object->cp_id) {
       my $existing_contact = $contacts_by_id{ $object->cp_id };
       if (!$existing_contact) {
-        $contacts_by_id{ $object->cp_id } = $object;
+        $contacts_by_id{ $object->cp_id } = $object if $object->cp_id;
 
       } elsif ($update_policy eq 'skip') {
         push(@{ $entry->{errors} }, $::locale->text('Skipping due to existing entry in database'));