-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving error handling with conflicting SN and PN's
If Netbox has multiple device types with the same Part Number the DeviceType.objects.get function throws an error. Same applies for devices with the same Serial Number. Neither condition should technically happen but Netbox doesn't treat PN or SN as unique so rather than throwing an exception, handle it gracefully.
- Loading branch information
Jason Yates
committed
Oct 30, 2021
1 parent
bd62f75
commit 43c9623
Showing
1 changed file
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters