Fix device MAC address imports not normalizing.
If it is not normalized you can get a not found error when provisioning since that is checking the database with a normalized MAC address
This commit is contained in:
@@ -291,6 +291,12 @@
|
|||||||
$result[$key] = preg_replace('{\D}', '', $result[$key]);
|
$result[$key] = preg_replace('{\D}', '', $result[$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//normalize the MAC address
|
||||||
|
if ($field_name == "device_mac_address") {
|
||||||
|
$result[$key] = strtolower($result[$key]);
|
||||||
|
$result[$key] = preg_replace('#[^a-fA-F0-9./]#', '', $result[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
//build the data array
|
//build the data array
|
||||||
if (strlen($table_name) > 0) {
|
if (strlen($table_name) > 0) {
|
||||||
if (strlen($parent) == 0) {
|
if (strlen($parent) == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user