#581 skip storing and displaying fabricated vlan 0

This commit is contained in:
Oliver Gorwits
2019-05-30 06:58:34 +01:00
parent 7d9c86cee1
commit 2c138a5690
6 changed files with 25 additions and 8 deletions

View File

@@ -399,6 +399,8 @@ sub carrying_vlan {
die "vlan number required for carrying_vlan\n"
if ref {} ne ref $cond or !exists $cond->{vlan};
return $rs unless $cond->{vlan};
return $rs
->search_rs({ 'vlans.vlan' => $cond->{vlan} },
{
@@ -449,6 +451,7 @@ sub carrying_vlan_name {
die "vlan name required for carrying_vlan_name\n"
if ref {} ne ref $cond or !exists $cond->{name};
$cond->{'vlans.vlan'} = { '>' => 0 };
$cond->{'vlans.description'} = { '-ilike' => delete $cond->{name} };
return $rs