Changeset 274


Ignore:
Timestamp:
Sep 22, 2017, 6:28:20 PM (7 years ago)
Author:
g7moreau
Message:
  • force switch_port_id to be numeric in upgrade computer database
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r273 r274  
    850850   for my $ip (keys %{$computerdb}) {
    851851
    852       # Rename switch_port -> switch_port_id (2017/09/15)
     852      # Rename switch_port -> switch_port_id (2017/09/15)
    853853      if (not exists $computerdb->{$ip}{'switch_port_id' and exists $computerdb->{$ip}{'switch_port'}}) {
    854854         $computerdb->{$ip}{'switch_port_id'} = $computerdb->{$ip}{'switch_port'} if defined $computerdb->{$ip}{'switch_port'};
     855         $computerdb->{$ip}{'switch_port_id'} = 0 if $computerdb->{$ip}{'switch_port_id'} !~ m/^\d+$/; # force numeric
    855856         }
    856857      delete $computerdb->{$ip}{'switch_port'} if exists $computerdb->{$ip}{'switch_port'};
Note: See TracChangeset for help on using the changeset viewer.