[freeside-devel] [freeside-commits] freeside/FS/FS cust_credit.pm, 1.27, 1.28
Jeff Finucane
jeff at cmh.net
Thu Dec 6 17:27:48 PST 2007
"Ivan,,," <ivan at wavetail.420.am>:
Thank you for your message of Fri, 07 Dec 2007 01:05:05 +0000....
+----------
| From: "Ivan,,," <ivan at wavetail.420.am>
| To: ivan-freeside-commits at sisd.com
| Message-Id: <20071207010505.D409EFC8269 at wavetail.420.am>
| Subject: [freeside-commits] freeside/FS/FS cust_credit.pm,1.27,1.28
|
| Modified Files:
| cust_credit.pm
| Log Message:
| some old databases may have 'hanging' cust_credit records; we don't want to abort the upgrade because of that, just warn
|
| Index: cust_credit.pm
| ===================================================================
| RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_credit.pm,v
| retrieving revision 1.27
| retrieving revision 1.28
| diff -u -d -r1.27 -r1.28
| --- cust_credit.pm 4 Dec 2007 18:20:56 -0000 1.27
| +++ cust_credit.pm 7 Dec 2007 01:04:59 -0000 1.28
| @@ -458,7 +458,8 @@
| $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;
| }
| }
+----------
Sure about this? I am not certain what you mean by "hanging"... do
you mean it won't pass ::check() for lack of find a cust_main?
As a practical matter, your change means upgrade completes, the reasons
disappear from the UI, and the warnings are issued again on a subsequent
upgrade run.
--
jeff at cmh.net
"There is no worse tyranny than to force a man to pay for what he does
not want merely because you think it would be good for him."
Professor Bernardo de le Paz
[ R.A. Heinlein -- "The Moon is a Harsh Mistress" ]
More information about the freeside-devel
mailing list