[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 9b43f17ec44e2994f446c90b8ff50e0a4099845f

Ivan ivan at 420.am
Wed May 8 04:35:42 PDT 2013


The branch, FREESIDE_2_3_BRANCH has been updated
       via  9b43f17ec44e2994f446c90b8ff50e0a4099845f (commit)
      from  d8831096a84836e9717f79a4f580863a1a434051 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9b43f17ec44e2994f446c90b8ff50e0a4099845f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed May 8 04:35:38 2013 -0700

    revert: proceed with a CCH update even if some GEOCODE/tax_rate_location deletions can't be found, RT#21687

diff --git a/FS/FS/tax_rate_location.pm b/FS/FS/tax_rate_location.pm
index aeb14d3..b4be8b9 100644
--- a/FS/FS/tax_rate_location.pm
+++ b/FS/FS/tax_rate_location.pm
@@ -234,14 +234,13 @@ sub batch_import {
 
         $hash->{disabled} = '';
         my $tax_rate_location = qsearchs('tax_rate_location', $hash);
-        if ( $tax_rate_location ) {
-          $tax_rate_location->disabled('Y');
-          my $error = $tax_rate_location->replace;
-          return $error if $error;
-        } else {
-          warn "WARNING: Can't find tax_rate_location to delete, continuing update anyway: ".
-                 join(" ", map { "$_ => ". $hash->{$_} } @fields);
-        }
+        return "Can't find tax_rate_location to delete: ".
+               join(" ", map { "$_ => ". $hash->{$_} } @fields)
+          unless $tax_rate_location;
+
+        $tax_rate_location->disabled('Y');
+        my $error = $tax_rate_location->replace;
+        return $error if $error;
 
         delete($hash->{$_}) foreach (keys %$hash);
       }

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/tax_rate_location.pm |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list