safety and tidy the port_macs patch

This commit is contained in:
Oliver Gorwits
2019-12-21 20:28:20 +00:00
parent 26d3fbdd40
commit 9a1938ddc9
2 changed files with 2 additions and 3 deletions

View File

@@ -29,9 +29,9 @@ addresses supplied as array reference
=cut
sub get_port_macs {
my ($fw_mac_list) = @_;
my $port_macs = {};
return {} unless defined $fw_mac_list and ref [] eq ref $fw_mac_list;
my $dp_macs
= schema('netdisco')->resultset('DevicePort')