Skip to content

Commit 9ad80ae

Browse files
committed
After reverting cvicente#66 changes, applying new coding synthax
1 parent 7c05b5b commit 9ad80ae

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

htdocs/management/asset_tasks.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,14 @@
164164

165165
# MAC
166166
if ( $d{physaddr} ){
167-
my $mac = PhysAddr->validate($d{physaddr});
168-
Netdot->throw_user("Invalid MAC: $d{physaddr}")
169-
unless $mac;
167+
my $mac = $d{physaddr};
168+
eval {
169+
$mac = PhysAddr->validate($mac);
170+
};
171+
if ( my $e = $@ ){
172+
Netdot->throw_user("Invalid MAC: $e");
173+
next;
174+
}
170175
if ( PhysAddr->search(address=>$mac)) {
171176
$dups{macs}{$mac} = 1;
172177
next;

0 commit comments

Comments
 (0)