customizations
customizations copied to clipboard
add_device_type_components.py: update the cached component counts on the Device
See discussion https://github.com/netbox-community/netbox/discussions/14975
Another approach would be to avoid bulk_create and instead do:
for i in items:
i.full_clean()
i.save()
Hey,
I tested this fix, and the original commit did not actually resolve the issue for me - same behavior as the current file. Your alternative with save() did work though. This is on netbox v3.7.4.
OK, I've changed it to the simpler (but perhaps slightly slower) approach.
my team tested this change manually, and it worked perfectly.
@candlerb what are your thoughts on: https://github.com/netbox-community/customizations/issues/100#issuecomment-2025921835