Component template counts increase when no component is effectively added #16415
stanislav-zaprudskiy
started this conversation in
General
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It's a re-post of this Slack thread, which didn't get any response.
I'm observing some unexpected behavior when dealing with component template counts on DeviceType (#13269 / #6347). Here's the test:
which fails with:
So the count got increased, even though
add()
didn't add thepowerporttemplate
(as it's been already associated).I believe it updates the counter because the corresponding
instance.tracker
doesn't get cleared upon.save()
, thus it wrongly assumes that it needs to update it. Am I doing something conceptually wrong in my code, or is it Netbox which would benefit from a fix? Thanks!Beta Was this translation helpful? Give feedback.
All reactions