Skip to content

Commit

Permalink
After reverting cvicente#66 changes, applying new coding synthax
Browse files Browse the repository at this point in the history
  • Loading branch information
vink78 committed Oct 27, 2017
1 parent 7c05b5b commit 9ad80ae
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions htdocs/management/asset_tasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,14 @@

# MAC
if ( $d{physaddr} ){
my $mac = PhysAddr->validate($d{physaddr});
Netdot->throw_user("Invalid MAC: $d{physaddr}")
unless $mac;
my $mac = $d{physaddr};
eval {
$mac = PhysAddr->validate($mac);
};
if ( my $e = $@ ){
Netdot->throw_user("Invalid MAC: $e");
next;
}
if ( PhysAddr->search(address=>$mac)) {
$dups{macs}{$mac} = 1;
next;
Expand Down

0 comments on commit 9ad80ae

Please sign in to comment.