Reverse accessor on Tags for plugins #14466
Replies: 2 comments 3 replies
-
This is an issue between the netbox_bgp plugin and the netbox_routing plugin. There is no fixing it on your end, and this likely can't be fixed within the tag mixin either (without creating longer names for the reverse accessors) however this does beg the question, do we need to track the reverse accessor on a Tag? |
Beta Was this translation helpful? Give feedback.
-
|
Hello there, I'm implementing a module for NetBox 4.2.9 that has a model named class TaggedItem(GenericTaggedItemBase):
tag = models.ForeignKey(
to=Tag,
related_name="%(app_label)s_%(class)s_items",
on_delete=models.CASCADE
)
...It appears that the reverse accessor name is set to something that includes the application name, but it looks like it's not taken into account. Could something elsewhere be overriding the expected Django behavior? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to fix an issue in a conflict between the bgp and netbox-routing plugins.
Both plugins have a PrefixList class that derives from NetboxModel. Both classes are in their own namespace but there is a conflict in the tags (derived from NetboxModel>TagsMixin.
When I use both plugins I get the following error during database migration:
I'm trying to fix it but i'm not sure how. The related_name field should be changed so there is no clash. But is this issue in the base class TagsMixin?
Beta Was this translation helpful? Give feedback.
All reactions