Kosmetik: Kommentare verbessert.
[kivitendo-erp.git] / SL / Controller / CsvImport / Contact.pm
index 5ca2ae8..e653d7c 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'));
@@ -126,16 +126,6 @@ sub get_duplicate_check_fields {
   };
 }
 
-sub field_lengths {
-  return ( cp_title     => 75,
-           cp_givenname => 75,
-           cp_name      => 75,
-           cp_phone1    => 75,
-           cp_phone2    => 75,
-           cp_gender    =>  1,
-         );
-}
-
 sub setup_displayable_columns {
   my ($self) = @_;