summaryrefslogtreecommitdiff
path: root/FS/FS/h_cust_svc.pm
diff options
context:
space:
mode:
authorkhoff <khoff>2005-08-02 19:17:09 +0000
committerkhoff <khoff>2005-08-02 19:17:09 +0000
commitf9520d436146a4f5f75c104f887f020fa778e509 (patch)
tree3c73bd222dfc97bc8a78eba2daf6e35519d772af /FS/FS/h_cust_svc.pm
parentb0c95cb531f14d955b246b94c2bd8548eb8f0241 (diff)
Only complain, not die, if we can't find a svc_x record for an h_cust_svc record.
Diffstat (limited to 'FS/FS/h_cust_svc.pm')
-rw-r--r--FS/FS/h_cust_svc.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/FS/FS/h_cust_svc.pm b/FS/FS/h_cust_svc.pm
index 718f2c7..af0bf60 100644
--- a/FS/FS/h_cust_svc.pm
+++ b/FS/FS/h_cust_svc.pm
@@ -80,13 +80,15 @@ sub h_svc_x {
"h_$svcdb",
{ 'svcnum' => $self->svcnum, },
"FS::h_$svcdb"->sql_h_searchs(@_),
- ) || $self->SUPER::svc_x
- or die "no history ${svcdb}.svcnum for cust_svc.svcnum ". $self->svcnum;
+ ) || $self->SUPER::svc_x;
- carp "Using $svcdb in place of missing h_${svcdb} record."
- if ($svc_x->isa('FS::' . $svcdb) and $DEBUG);
-
- return $svc_x;
+ if ($svc_x) {
+ carp "Using $svcdb in place of missing h_${svcdb} record."
+ if ($svc_x->isa('FS::' . $svcdb) and $DEBUG);
+ return $svc_x;
+ } else {
+ return '';
+ }
}