[freeside-commits] freeside/FS/FS h_cust_svc.pm,1.5,1.6
Kristian Hoffmann,420,,
khoff at wavetail.420.am
Tue Aug 2 12:17:11 PDT 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv22347
Modified Files:
h_cust_svc.pm
Log Message:
Only complain, not die, if we can't find a svc_x record for an h_cust_svc record.
Index: h_cust_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/h_cust_svc.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- h_cust_svc.pm 11 Apr 2005 16:48:42 -0000 1.5
+++ h_cust_svc.pm 2 Aug 2005 19:17:09 -0000 1.6
@@ -80,13 +80,15 @@
"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;
-
- carp "Using $svcdb in place of missing h_${svcdb} record."
- if ($svc_x->isa('FS::' . $svcdb) and $DEBUG);
+ ) || $self->SUPER::svc_x;
- 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 '';
+ }
}
More information about the freeside-commits
mailing list