Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34b1391ff0 | ||
|
|
340f404f94 |
No files matched your search
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#define AppName "NetBox Synchronizer"
|
#define AppName "NetBox Synchronizer"
|
||||||
#ifndef AppVersion
|
#ifndef AppVersion
|
||||||
#define AppVersion "4.10.4"
|
#define AppVersion "4.10.5"
|
||||||
#endif
|
#endif
|
||||||
#define AppPublisher "Louis-Alexander Kerst"
|
#define AppPublisher "Louis-Alexander Kerst"
|
||||||
#define AppExeName "NetBoxSynchronizer.exe"
|
#define AppExeName "NetBoxSynchronizer.exe"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"""NetBox Synchronizer – VMs, switches and clients from the field into NetBox."""
|
"""NetBox Synchronizer – VMs, switches and clients from the field into NetBox."""
|
||||||
|
|
||||||
APP_NAME = "NetBox Synchronizer"
|
APP_NAME = "NetBox Synchronizer"
|
||||||
APP_VERSION = "4.10.4"
|
APP_VERSION = "4.10.5"
|
||||||
APP_PUBLISHER = "Louis-Alexander Kerst"
|
APP_PUBLISHER = "Louis-Alexander Kerst"
|
||||||
APP_USER_MODEL_ID = "Louis-AlexanderKerst.NetBoxSynchronizer"
|
APP_USER_MODEL_ID = "Louis-AlexanderKerst.NetBoxSynchronizer"
|
||||||
|
|
||||||
|
|||||||
@@ -976,12 +976,14 @@ class SwitchMappingDialog(_Dialog):
|
|||||||
chosen = combo.currentData()
|
chosen = combo.currentData()
|
||||||
target = "" if chosen == self.NEW else chosen
|
target = "" if chosen == self.NEW else chosen
|
||||||
mapping = result[switch["id"]]["interface_map"]
|
mapping = result[switch["id"]]["interface_map"]
|
||||||
if target and (switch["id"], target) in used:
|
# Stack members have their own devices, so equal names are only a clash on the same device.
|
||||||
|
key = (switch["id"], item.get("owner_id"), target)
|
||||||
|
if target and key in used:
|
||||||
self.show_error(f"{switch['name']}: „{target}“ ist mehreren Schnittstellen zugeordnet "
|
self.show_error(f"{switch['name']}: „{target}“ ist mehreren Schnittstellen zugeordnet "
|
||||||
f"({used[(switch['id'], target)]}, {item['name']}).")
|
f"({used[key]}, {item['name']}).")
|
||||||
return
|
return
|
||||||
if target:
|
if target:
|
||||||
used[(switch["id"], target)] = item["name"]
|
used[key] = item["name"]
|
||||||
# Plain name matches stay automatic; everything else is remembered.
|
# Plain name matches stay automatic; everything else is remembered.
|
||||||
if item["method"] == "name" and target == item["netbox_name"]:
|
if item["method"] == "name" and target == item["netbox_name"]:
|
||||||
mapping.pop(item["name"], None)
|
mapping.pop(item["name"], None)
|
||||||
|
|||||||
Reference in new issue
Block a user