Device Port filter by vlan includes both tagging and untagged

This commit is contained in:
Oliver Gorwits
2013-01-29 21:31:49 +00:00
parent 4f8105a109
commit 782084a8fa
2 changed files with 10 additions and 1 deletions

View File

@@ -197,7 +197,12 @@ ajax '/ajax/content/device/ports' => sub {
my $q = param('f');
if ($q) {
if ($q =~ m/^\d+$/) {
$set = $set->search({'me.vlan' => $q});
$set = $set->search({
-or => {
'me.vlan' => $q,
'port_vlans_tagged.vlan' => $q,
},
}, { join => 'port_vlans_tagged' });
return unless $set->count;
}
else {