projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
821befd
)
warn during upgrade if addr_block records are missing, #17040
author
Mark Wells
<mark@freeside.biz>
Tue, 20 Mar 2012 18:33:50 +0000
(11:33 -0700)
committer
Mark Wells
<mark@freeside.biz>
Tue, 20 Mar 2012 18:33:50 +0000
(11:33 -0700)
FS/FS/svc_broadband.pm
patch
|
blob
|
history
diff --git
a/FS/FS/svc_broadband.pm
b/FS/FS/svc_broadband.pm
index
e9917ff
..
06a3001
100755
(executable)
--- 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 ) {