diff options
author | Mark Wells <mark@freeside.biz> | 2012-03-20 11:33:50 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-03-20 11:33:50 -0700 |
commit | 4d912748b3db3981fd03cdf74df7da696320f46d (patch) | |
tree | 79c5b44e8f099ead7628ba01885d6e63e35d4e13 /FS/FS/svc_broadband.pm | |
parent | 821befdd93dff664debfdbeea7b25a724c91093c (diff) |
warn during upgrade if addr_block records are missing, #17040
Diffstat (limited to 'FS/FS/svc_broadband.pm')
-rwxr-xr-x | FS/FS/svc_broadband.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index e9917ff..06a3001 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -640,6 +640,11 @@ sub _upgrade_data { routernum => '' })) { my $addr_block = $self->addr_block; + if ( !$addr_block ) { + # super paranoid mode + warn "WARNING: svcnum ".$self->svcnum." is assigned to addr_block ".$self->blocknum.", which does not exist; skipped.\n"; + next; + } my $ip_addr = $self->ip_addr; my $routernum = $addr_block->routernum; if ( $routernum ) { |