Queryset not working

Hello,

I cant understand why my 'brand’ queryset under ProductsListView doesnt do anything. When I click on it, it does nothing.

views.py

class ProductsListView(ListView):
    model = Product
    template_name = 'products_list.html'
    context_object_name = 'products'

    def get_queryset(self):
        products = Product.objects.all()

        category_id = self.request.GET.get('category', None)
        search = self.request.GET.get('search', None)
        brand = self.request.GET.get('brand', None)

        if brand is not None:
            products = products.filter(brand__iexact=brand)

        if search is not None:
            products = products.filter(name__icontains=search)

        if category_id is not None:
            products = products.filter(category__id=int(category_id))

        return products

template

 <ul class="list-group">
                <li class="list-group-item mr-3 dropdown-toggle" type="button" data-toggle="dropdown" id="BrandDropDown" aria-haspopup="true" aria-expanded="false">
                    Brand


                    <div class="dropdown-menu" aria-labelledby="BrandDropDown">
                        {% for p in products %}
                        <a class="dropdown-item" href="{% url 'products' %}?brand={{p.brand}}">{{p.brand}}</a>
                        {% endfor %}
                </div>

                </li>
            </ul>

urls.py

path('products_list', views.ProductsListView.as_view(), name='products'),

Solved.
The problem seemed to be in the template. I have reconfigure it and it now looksl ike this:

<ul class="list-group">
                <li class="list-group-item mr-3">
                    <a class="dropdown-toggle text-dark" data-toggle="dropdown" href="#">
                        Brand
                    </a>
                    
                    <ul class="dropdown-menu" role="menu" aria-labelledby="BrandDropDown">
                        {% for p in all_products %}

                            <li><a class="dropdown-item" href="{% url 'login' %}">{{p.brand}}</a></li>
                        {% else %}
                            <li><a class="dropdown-item" href="{% url 'products' %}?brand={{p.brand}}">{{p.brand}}</a></li>

                        
                        {% endfor %}
                </ul>