diff options
author | ivan <ivan> | 2008-02-22 00:57:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-02-22 00:57:38 +0000 |
commit | 14d75ba92440f6ca825c3c8dd7dfd402e85ce54f (patch) | |
tree | 61e34e1fd20189fdeb0ee4e2c4fe6a9526fa3d7e /FS | |
parent | ad43e1c50179b50d09538274fd9ec932edbad173 (diff) |
don't bomb out on this transition on old databases without history records for everything...
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_pay.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 67f34c387..5ba5b0a7d 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -698,7 +698,11 @@ sub _upgrade_data { #class method return unless $cust_pay; my $h_cust_pay = $cust_pay->h_search('insert'); - $cust_pay->otaker($h_cust_pay->history_user); + if ( $h_cust_pay ) { + $cust_pay->otaker($h_cust_pay->history_user); + } else { + $cust_pay->otaker('legacy'); + } my $error = $cust_pay->replace; die $error if $error; |