device port search will match on Description as well as Port

This commit is contained in:
Oliver Gorwits
2018-05-07 17:34:13 +01:00
parent 6098b893ad
commit d7a0bec20b
2 changed files with 3 additions and 1 deletions

View File

@@ -63,11 +63,12 @@ get '/ajax/content/device/ports' => require_login sub {
}
if (($prefer eq 'port') or not $prefer and
$set->search({'me.port' => $f})->count) {
$set->search({-or => ['me.port' => $f, 'me.descr' => $f]})->count) {
$set = $set->search({
-or => [
'me.port' => $f,
'me.descr' => $f,
'me.slave_of' => $f,
],
});