Device module ID counter is not reset after a module is deleted #7347

Closed
opened 2025-12-29 20:22:10 +01:00 by adam · 1 comment
Owner

Originally created by @artiomello on GitHub (Dec 12, 2022).

NetBox version

v3.3.7

Python version

3.8

Steps to Reproduce

  1. Create devices with module bays
  2. Create some modules
  3. Add modules to devices
  4. Delete newly added modules from devices
  5. Repeat steps 3&4 a few times
  6. Check the Module ID under Device > Modules

Expected Behavior

An assigned device module should release its ID after it is deleted.

Observed Behavior

Device module ID counter is not reset after a module is deleted:
image

Originally created by @artiomello on GitHub (Dec 12, 2022). ### NetBox version v3.3.7 ### Python version 3.8 ### Steps to Reproduce 1. Create devices with module bays 2. Create some modules 3. Add modules to devices 4. Delete newly added modules from devices 5. Repeat steps 3&4 a few times 6. Check the Module ID under Device > Modules ### Expected Behavior An assigned device module should release its ID after it is deleted. ### Observed Behavior Device module ID counter is not reset after a module is deleted: ![image](https://user-images.githubusercontent.com/102314521/207103113-775729a0-7a4b-4ab1-8e7d-85e16e64a0d5.png)
adam closed this issue 2025-12-29 20:22:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 12, 2022):

The ID is automatically assigned from a database sequence, as with most objects in NetBox, and exists solely to uniquely identify the object. It is never intended to be reset.

@jeremystretch commented on GitHub (Dec 12, 2022): The ID is automatically assigned from a database sequence, as with most objects in NetBox, and exists solely to uniquely identify the object. It is never intended to be reset.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7347