You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking to use the permission system to allow access to a specific site group, and objects related to that. Unfortunately, I'm running into a bit of a snag when it comes to Image Attachments.
I can't figure out how to write a query to say "image attachments, that belong to a rack, that belongs to a site". Let alone to add a site group into the mix.
Invalid filter for <class 'extras.models.models.ImageAttachment'>: Field 'parent' does not generate an automatic reverse relation and therefore cannot be used for reverse querying. If it is a GenericForeignKey, consider adding a GenericRelation.
Is this simply a limitation of the current object model of Netbox, i.e. the database isn't set up to handle this type of query, or is there some magic incantation I can use here?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
I'm looking to use the permission system to allow access to a specific site group, and objects related to that. Unfortunately, I'm running into a bit of a snag when it comes to Image Attachments.
I can't figure out how to write a query to say "image attachments, that belong to a rack, that belongs to a site". Let alone to add a site group into the mix.
I should be something like this:
But that leaves me with this validation error:
Is this simply a limitation of the current object model of Netbox, i.e. the database isn't set up to handle this type of query, or is there some magic incantation I can use here?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions