Fix Device Ports search for VLAN prefer with non-numeric value

This commit is contained in:
Oliver Gorwits
2017-12-10 21:06:21 +00:00
parent ae2a3f5343
commit e8ee50490d
2 changed files with 4 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
[BUG FIXES]
* Specific search from titlebar uses default sidebar settings
* Fix Device Ports search for VLAN prefer with non-numeric value
2.036011 - 2017-10-09

View File

@@ -23,7 +23,9 @@ get '/ajax/content/device/ports' => require_login sub {
# refine by ports if requested
my $f = param('f');
if ($f) {
if (($prefer eq 'vlan') or not $prefer and $f =~ m/^\d+$/) {
if (($prefer eq 'vlan') or (not $prefer and $f =~ m/^\d+$/)) {
return unless $f =~ m/^\d+$/;
if (param('invert')) {
$set = $set->search({
'me.vlan' => { '!=' => $f },