From 7753d82a54563e4c9189d54ec23fac969e592e89 Mon Sep 17 00:00:00 2001
From: ivan <ivan>
Date: Fri, 7 Dec 2007 01:04:59 +0000
Subject: [PATCH] some old databases may have 'hanging' cust_credit records; we
 don't want to abort the upgrade because of that, just warn

---
 FS/FS/cust_credit.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm
index 4c94e1578..6cbe1d046 100644
--- a/FS/FS/cust_credit.pm
+++ b/FS/FS/cust_credit.pm
@@ -458,7 +458,8 @@ sub _upgrade_data {  # class method
         $cust_credit->setfield('reason', '');
         my $error = $cust_credit->replace;
 
-        die "error inserting $self into database: $error\n"
+        warn "*** WARNING: error replacing reason in $self ".
+             $self->crednum. ": $error ***\n"
           if $error;
       }
     }
-- 
2.20.1