'priority' => 1,
};
$error = $radius_group->insert;
- return "error inserting group $groupname: $error" if $error;
+ if ( $error ) {
+ warn "error inserting group $groupname: $error";
+ next;#don't continue trying to insert the attribute
+ }
$attrs_of{$groupname} = {};
$groupnum_of{$groupname} = $radius_group->groupnum;
}
'value' => $value,
};
$error = $new->replace($old);
- return "error modifying attr $attrname: $error" if $error;
+ if ( $error ) {
+ warn "error modifying attr $attrname: $error";
+ next;
+ }
}
else {
$new = new FS::radius_attr {
'value' => $value,
};
$error = $new->insert;
- return "error inserting attr $attrname: $error" if $error;
+ if ( $error ) {
+ warn "error inserting attr $attrname: $error" if $error;
+ next;
+ }
}
$attrs_of{$groupname}->{$attrname} = $new;
} #foreach $row
=cut
my %ops = (
- C => [ '==', ':=', '+=', '!=', '>', '>=', '<', '<=', '=~', '!~', '=*', '!*' ],
+ C => [ '=', '==', ':=', '+=', '!=', '>', '>=', '<', '<=', '=~', '!~', '=*', '!*' ],
R => [ '=', ':=', '+=' ],
);
my $router = $self->router;
return "Router ".$self->routernum." does not serve this customer"
- if $router->agentnum and $router->agentnum != $agentnum;
+ if $router->agentnum and $agentnum and $router->agentnum != $agentnum;
if ( $router->manual_addr ) {
$self->blocknum('');
my $self = shift;
my $svcpart = $self->svcnum ? $self->cust_svc->svcpart : $self->svcpart;
my @r = map { $_->router } qsearch('part_svc_router',
- { svcpart => $self->cust_svc->svcpart });
+ { svcpart => $svcpart });
if ( $self->cust_main ) {
my $agentnum = $self->cust_main->agentnum;
return grep { !$_->agentnum or $_->agentnum == $agentnum } @r;
sub router {
my $svc = shift;
- my $router = $svc->router or return '';
+ my $router = $svc->router;
my $block = $svc->addr_block;
+ $router = $router->routernum . ': ' . $router->routername if $router;
$block = '; '.$block->cidr if $block;
- $router->routernum . ': ' . $router->routername . $block
+ $router . $block
}
sub ip_addr {