summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pkg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r--FS/FS/cust_pkg.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index cd801d9..9d20fd6 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -1272,7 +1272,13 @@ sub uncancel_svc_summary {
'uncancel_svcnum' => $svc_x->get('_h_svc_x')->svcnum,
};
$svc_x->pkgnum($self->pkgnum); # provisioning services on a canceled package, will be rolled back
- if ($opt{'no_test_reprovision'} or $svc_x->insert) {
+ my $insert_error;
+ unless ($opt{'no_test_reprovision'}) {
+ # avoid possibly fatal errors from missing linked records
+ eval { $insert_error = $svc_x->insert };
+ $insert_error ||= $@;
+ }
+ if ($opt{'no_test_reprovision'} or $insert_error) {
# avoid possibly fatal errors from missing linked records
eval { $out->{'label'} = $svc_x->label };
eval { $out->{'label'} = $svc_x->get('_h_svc_x')->label } unless defined($out->{'label'});