mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-01 15:52:28 -07:00
BE+FE: Check if current mac != parent mac for network page setup #1513
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -536,6 +536,12 @@ class DeviceInstance:
|
||||
normalized_mac = normalize_mac(mac)
|
||||
normalized_parent_mac = normalize_mac(data.get("devParentMAC") or "")
|
||||
|
||||
if normalized_mac == normalized_parent_mac:
|
||||
return {
|
||||
"success": False,
|
||||
"error": "Can't set current node as the node parent."
|
||||
}
|
||||
|
||||
fields_updated_by_set_device_data = {
|
||||
"devName",
|
||||
"devOwner",
|
||||
|
||||
Reference in New Issue
Block a user