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:
jokob-sk
2026-02-14 10:43:24 +11:00
parent e741ff51b5
commit 2765e441a5
3 changed files with 14 additions and 1 deletions

View File

@@ -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",