From f034f0e044b27e34b9e4e2fc819825b21c693df5 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 23 Jan 2019 11:18:19 -0500 Subject: [PATCH] RT# 79352 - fixed insert error where new contacts not tied to customer on insert. --- FS/FS/contact.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm index 13f07a283..9775e7f6b 100644 --- a/FS/FS/contact.pm +++ b/FS/FS/contact.pm @@ -168,7 +168,6 @@ sub insert { my $existing_contact = ''; my @contact_emails = (); my %contact_nums = (); - $contact_nums{$self->contactnum} = '1' if $self->contactnum; if ( $self->get('emailaddress') =~ /\S/ ) { @@ -202,6 +201,8 @@ sub insert { return $error; } + $contact_nums{$self->contactnum} = '1' if $self->contactnum; + my $cust_contact = ''; # if $self->custnum was set, then the customer-specific properties # (custnum, classnum, invoice_dest, selfservice_access, comment) are in -- 2.11.0