Fix SQL logic in PortMAC.pm (imperfectus)
SQL::Abstract::belch(): [SQL::Abstract::_where_field_op_ARRAYREF] Warning: A multi-element arrayref as an
argument to the inequality op '!=' is technically equivalent to an always-true 1=1 (you probably wanted to
say ...{ $inequality_op => [ -and => @values ] }... instead) at
/home/netdisco/perl5/lib/perl5/App/Netdisco/Util/PortMAC.pm line 48
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
* [#85] device property in _no/_only fails with error (R. Kerr)
|
* [#85] device property in _no/_only fails with error (R. Kerr)
|
||||||
* Also prefer port filter when linking to connected devices
|
* Also prefer port filter when linking to connected devices
|
||||||
|
* Fix SQL logic in PortMAC.pm (imperfectus)
|
||||||
|
|
||||||
2.021001
|
2.021001
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ sub get_port_macs {
|
|||||||
|
|
||||||
my $dp_macs
|
my $dp_macs
|
||||||
= schema('netdisco')->resultset('DevicePort')
|
= schema('netdisco')->resultset('DevicePort')
|
||||||
->search( { mac => { '!=', [ undef, '00:00:00:00:00:00' ] } },
|
->search( { mac => { '!=' => [ -and => (undef, '00:00:00:00:00:00') ] } },
|
||||||
{ select => [ 'mac', 'ip' ],
|
{ select => [ 'mac', 'ip' ],
|
||||||
group_by => [ 'mac', 'ip' ] } );
|
group_by => [ 'mac', 'ip' ] } );
|
||||||
my $dp_cursor = $dp_macs->cursor;
|
my $dp_cursor = $dp_macs->cursor;
|
||||||
|
|||||||
Reference in New Issue
Block a user