[freeside-commits] branch master updated. 38f5269087720ea350137eca109d63cc423b50f9

Christopher Burger burgerc at freeside.biz
Thu Aug 16 17:14:44 PDT 2018


The branch, master has been updated
       via  38f5269087720ea350137eca109d63cc423b50f9 (commit)
      from  f81eebbe27a6acc0ae4284fa04b5525a41ae4570 (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 38f5269087720ea350137eca109d63cc423b50f9
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Thu Aug 16 20:14:03 2018 -0400

    RT# 78356 - updated script to allow for null values when moving.

diff --git a/bin/move_svc_broadband_speeds.pl b/bin/move_svc_broadband_speeds.pl
old mode 100644
new mode 100755
index 8a9af99f2..7d20ef68a
--- a/bin/move_svc_broadband_speeds.pl
+++ b/bin/move_svc_broadband_speeds.pl
@@ -16,10 +16,10 @@ foreach my $rec (qsearch({
   'table'     => 'svc_broadband',
   'addl_from' => 'LEFT JOIN cust_svc USING ( svcnum ) LEFT JOIN cust_pkg USING ( pkgnum )',
 })) {
-  $rec->{Hash}->{speed_test_up} = $rec->{Hash}->{speed_up};
-  $rec->{Hash}->{speed_test_down} = $rec->{Hash}->{speed_down};
-  $rec->{Hash}->{speed_up} = $rec->{Hash}->{fcc477_upstream} * 1000;
-  $rec->{Hash}->{speed_down} = $rec->{Hash}->{fcc477_downstream} * 1000;
+  $rec->{Hash}->{speed_test_up} = $rec->{Hash}->{speed_up} ? $rec->{Hash}->{speed_up} : "null";
+  $rec->{Hash}->{speed_test_down} = $rec->{Hash}->{speed_down} ? $rec->{Hash}->{speed_down} : "null";
+  $rec->{Hash}->{speed_up} = $rec->{Hash}->{fcc477_upstream} ? $rec->{Hash}->{fcc477_upstream} * 1000 : "null";
+  $rec->{Hash}->{speed_down} = $rec->{Hash}->{fcc477_downstream} ? $rec->{Hash}->{fcc477_downstream} * 1000 : "null";
 
   my $sql = "UPDATE svc_broadband set
                speed_up = $rec->{Hash}->{speed_up},

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

Summary of changes:
 bin/move_svc_broadband_speeds.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 mode change 100644 => 100755 bin/move_svc_broadband_speeds.pl




More information about the freeside-commits mailing list