[freeside-commits] branch master updated. 6702f62122aeca25cedd635914a9bd9d1d5a35eb

Christopher Burger burgerc at freeside.biz
Tue Jan 29 14:43:51 PST 2019


The branch, master has been updated
       via  6702f62122aeca25cedd635914a9bd9d1d5a35eb (commit)
      from  a9056b16e215e7ac8da9144106e34918cced951f (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 6702f62122aeca25cedd635914a9bd9d1d5a35eb
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Jan 29 17:43:25 2019 -0500

    RT# 78356 - cleaned up error message display

diff --git a/FS/FS/part_export/saisei.pm b/FS/FS/part_export/saisei.pm
index f409046a5..db42f6107 100644
--- a/FS/FS/part_export/saisei.pm
+++ b/FS/FS/part_export/saisei.pm
@@ -356,11 +356,11 @@ sub export_tower_sector {
       'sector_downrate_limit' => $tower_sector->{Hash}->{down_rate_limit},
       'modify_existing'       => '1', # modify an existing access point with this info
     };
-    my $sector_access_point = process_sector($self, $sector_opt);
+    my $sector_access_point = process_sector($self, $sector_opt) unless ($sector_name eq "_default");
       return $sector_access_point if $sector_access_point->{error};
   }
 
-  return $self->api_error;
+  return { error => $self->api_error, };
 }
 
 ## creates the rateplan name
@@ -537,7 +537,7 @@ sub api_get_host {
 
   my $get_host = $self->api_call("GET", "/hosts/$ip");
 
-  return $self->api_error if $self->api_error;
+  return { message => $self->api_error, } if $self->api_error;
 
   return $get_host;
 }
@@ -819,6 +819,7 @@ sub process_tower {
 
   my $accesspoint = $self->api_get_accesspoint($tower_name);
 
+  return { error => $self->api_error, } if $self->api_error;
   return $accesspoint;
 }
 
@@ -857,6 +858,7 @@ sub process_sector {
   # set access point to existing one or newly created one.
   my $accesspoint = $existing_sector_ap ? $existing_sector_ap : $self->api_get_accesspoint($sector_name);
 
+  return { error => $self->api_error, } if $self->api_error;
   return $accesspoint;
 }
 

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

Summary of changes:
 FS/FS/part_export/saisei.pm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list