netbox
netbox copied to clipboard
Fixes: #14044 - Allow regex renaming of unnamed devices
Fixes: #14044 - Allow regex renaming of unnamed devices
- 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
Note: I removed the ^$ requirement as, in my view, as long as there is a valid regex and the regex results in a unique set, we don't need to enforce the ^$ requirement. For example: ^
or .*
or .
would all be equally as valid.
The main changes here catch both IntegrityError's from the DB and a validation error to ensure regex is used.