Skip to content
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

add_device_type_components.py: update the cached component counts on the Device #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

candlerb
Copy link
Contributor

@candlerb candlerb commented Jan 30, 2024

@candlerb
Copy link
Contributor Author

Another approach would be to avoid bulk_create and instead do:

                    for i in items:
                        i.full_clean()
                        i.save()

@Pythbit
Copy link

Pythbit commented Mar 14, 2024

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.

@candlerb
Copy link
Contributor Author

OK, I've changed it to the simpler (but perhaps slightly slower) approach.

@ip-rx
Copy link

ip-rx commented Mar 28, 2024

my team tested this change manually, and it worked perfectly.

@ip-rx
Copy link

ip-rx commented Mar 28, 2024

@candlerb what are your thoughts on: #100 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants