-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoneType AttributeError when Bulk Renaming Nameless Devices #14044
Comments
The error is caused by this line, which assumes the device name will be a string (as opposed to None):
|
I'm not clear on what behavior you expect. The bulk rename function requires a "find" value, which cannot match a null name. @arthanson's PR #14065 will effectively ignore unnamed devices, avoiding the exception. The only way I see to enable renaming unnamed devices would be to blindly apply the "replace" value, which seems very dangerous. |
The behavior I'm expecting is to be able to bulk rename unnamed devices. Perhaps an extension to this form is suitable, e.g. a checkbox to force-match against unnamed devices |
Renaming them all to the same name? |
In this instance yes - the use case was a stack of devices were created as placeholders to fill out a rack diagram. Think things like Cable Organizer Trays or Patch Panels, they don't need unique names. |
I don't think our data model will allow this, as name would not be unique. |
I believe this was discussed during a maintainers meeting, the consensus is this:
|
* Allow regex renaming of unnamed devices (already allowed actually) * Catch errors relating to unnamed devices or integrity errors as a result of the rename process
NetBox version
3.6.3
Python version
3.8
Steps to Reproduce
Of note, I am also unable to rename nameless devices with Regex on, but no error is observed.
Expected Behavior
The renaming of bulk devices operation should be successful.
Observed Behavior
The text was updated successfully, but these errors were encountered: