[freeside-commits] branch FREESIDE_4_BRANCH updated. f39e443ac725b70b721fecf6bd53e3df4a502d94

Christopher Burger burgerc at freeside.biz
Fri Aug 17 05:13:38 PDT 2018


The branch, FREESIDE_4_BRANCH has been updated
       via  f39e443ac725b70b721fecf6bd53e3df4a502d94 (commit)
      from  3bd9ee35ea8ed387984848c3f85c8aea41f0ac4f (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 f39e443ac725b70b721fecf6bd53e3df4a502d94
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