def set_manufacturer_filter(request, category_slug, manufacturer_id):
    try:
        manufacturer_id = int(manufacturer_id)
        if Manufacturer.objects.filter(pk=manufacturer_id).exists():
            mf = request.session.get("manufacturer-filter", [])
            if manufacturer_id not in mf:
                mf.append(manufacturer_id)
            request.session["manufacturer-filter"] = mf
    except (ValueError, TypeError) as e:
        pass

    url = reverse("lfs_category", kwargs={"slug": category_slug})
    return HttpResponseRedirect(url)
Used when the entire index for model is updated.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/views.py/set_manufacturer_filter--crossover with--dataset/ETHPy150Open mozilla/source/source/people/search_indexes.py/OrganizationIndex.index_queryset