Need help with Custom Script and Interface Template Filtering #19186
-
Hi. I want to filter Interface Templates by Device Type. Does anybody know wheres my fault at filter query?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
why don't you use anyway, your filtering should work just fine. I just did some tests on my netbox and it works like it should in nb-shell:
what version of netbox are you using? |
Beta Was this translation helpful? Give feedback.
-
Thx for your advise... That works :) I am using 4.2.2 |
Beta Was this translation helpful? Give feedback.
why don't you use
device.device_type.interfacetemplates.all()
to get all the interfacetemplates that device_type has directly?anyway, your filtering should work just fine. I just did some tests on my netbox and it works like it should in nb-shell:
`>>> device = Device.objects.get(name='')
what version of netbox are you using?