diff options
author | Ivan Kohler <ivan@freeside.biz> | 2018-11-28 13:17:53 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2018-11-28 13:17:53 -0800 |
commit | 28cb520f6273aa76b4735ce22215e2235501198c (patch) | |
tree | 47fdd3f1be7dd7da85ed1cbbefa674d0e11f0c66 | |
parent | bcc11e8b99854452cdccd9406918c015bee784cb (diff) |
fix error linking legacy services, RT#81818
-rw-r--r-- | FS/FS/cust_svc.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index e64862f9d..d4d8684ac 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -401,8 +401,10 @@ sub replace { #my $error = $new->SUPER::replace($old, @_); my $error = $new->SUPER::replace($old); - #trigger a relocate export on location changes - if ( $new->cust_pkg->locationnum != $old->cust_pkg->locationnum ) { + #trigger a relocate export on location changes (NENA2 and Northern 911 export) + my $old_pkg = $old->cust_pkg; + my $new_pkg = $new->cust_pkg; + if ( $old_pkg && $new_pkg && $new_pkg->locationnum != $old_pkg->locationnum ) { my $svc_x = $new->svc_x; if ( $svc_x->locationnum ) { if ( $svc_x->locationnum == $old->cust_pkg->locationnum ) { |