[freeside-commits] freeside/FS/FS cust_main.pm,1.245,1.246
Ivan,,,
ivan at wavetail.420.am
Sat Oct 7 14:41:01 PDT 2006
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv5100
Modified Files:
cust_main.pm
Log Message:
better error msg on CSV import with bad pkgpart
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -d -r1.245 -r1.246
--- cust_main.pm 4 Oct 2006 21:22:07 -0000 1.245
+++ cust_main.pm 7 Oct 2006 21:40:58 -0000 1.246
@@ -4473,7 +4473,12 @@
my @svc_acct = ();
if ( $svc_acct{'username'} ) {
- $svc_acct{svcpart} = $cust_pkg->part_pkg->svcpart( 'svc_acct' );
+ my $part_pkg = $cust_pkg->part_pkg;
+ unless ( $part_pkg ) {
+ $dbh->rollback if $oldAutoCommit;
+ return "unknown pkgnum ". $cust_pkg{'pkgpart'};
+ }
+ $svc_acct{svcpart} = $part_pkg->svcpart( 'svc_acct' );
push @svc_acct, new FS::svc_acct ( \%svc_acct )
}
More information about the freeside-commits
mailing list