1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

TagFilter should call unrestricted() on its queryset

This commit is contained in:
Jeremy Stretch
2020-06-29 15:36:02 -04:00
parent 15f32bdd73
commit af778f8fca
3 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ class TagFilter(django_filters.ModelMultipleChoiceFilter):
kwargs.setdefault('field_name', 'tags__slug')
kwargs.setdefault('to_field_name', 'slug')
kwargs.setdefault('conjoined', True)
kwargs.setdefault('queryset', Tag.objects.all())
kwargs.setdefault('queryset', Tag.objects.unrestricted())
super().__init__(*args, **kwargs)

View File

@ -596,7 +596,7 @@ class TagFilterField(forms.MultipleChoiceField):
def __init__(self, model, *args, **kwargs):
def get_choices():
tags = model.tags.annotate(
tags = model.tags.all().unrestricted().annotate(
count=Count('extras_taggeditem_items')
).order_by('name')
return [

View File

@ -151,7 +151,7 @@ class TagColumn(tables.TemplateColumn):
Display a list of tags assigned to the object.
"""
template_code = """
{% for tag in value.all %}
{% for tag in value.all.unrestricted %}
{% include 'utilities/templatetags/tag.html' %}
{% empty %}
<span class="text-muted">&mdash;</span>