From: Mark Wells Date: Thu, 10 Apr 2014 22:19:42 +0000 (-0700) Subject: stop new IP address assignment code from tripping over ancient svc_acct.slipip values... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=58323c34f3dd367739d9b3c4c67e5b147f9fc882 stop new IP address assignment code from tripping over ancient svc_acct.slipip values, #28184 --- diff --git a/FS/FS/svc_IP_Mixin.pm b/FS/FS/svc_IP_Mixin.pm index ff7c2f5d4..5b06082a1 100644 --- a/FS/FS/svc_IP_Mixin.pm +++ b/FS/FS/svc_IP_Mixin.pm @@ -96,7 +96,12 @@ sub _used_addresses { my %hash = ( $ip_field => { op => '!=', value => '' } ); #$hash{'blocknum'} = $block->blocknum if $block; $hash{'svcnum'} = { op => '!=', value => $exclude->svcnum } if ref $exclude; - map { $_->NetAddr->addr } qsearch($class->table, \%hash); + map { my $na = $_->NetAddr; $na ? $na->addr : () } + qsearch({ + table => $class->table, + hashref => \%hash, + extra_sql => " AND $ip_field != '0e0'", + }); } sub _is_used {