Interfaces not a valid filter_count choice

This commit is contained in:
Joseph Kennedy 2017-08-30 03:19:54 -04:00
parent ae37155de5
commit 0bda6c936e

View File

@ -1621,7 +1621,7 @@ class InterfaceListFilterForm(BootstrapMixin, forms.Form):
model = Interface model = Interface
q = forms.CharField(required=False, label='Search') q = forms.CharField(required=False, label='Search')
site = FilterChoiceField( site = FilterChoiceField(
queryset=Site.objects.annotate(filter_count=Count('interfaces')), queryset=Site.objects.annotate(filter_count=Count('devices')),
to_field_name='slug', to_field_name='slug',
) )
#device = forms.ModelChoiceField(required=False, queryset=Device.objects.all(), to_field_name='slug') #device = forms.ModelChoiceField(required=False, queryset=Device.objects.all(), to_field_name='slug')