def reset_number_filter(request, category_slug, property_group_id, property_id):
    """Resets product filter with given property id. Redirects to the category
    with given slug.
    """
    key = '{0}_{1}'.format(property_group_id, property_id)
    try:
        product_filter = request.session.get("product-filter")
        del product_filter["number-filter"][key]
    except __HOLE__:
        pass
    else:
        if product_filter["number-filter"] == {}:
            del product_filter["number-filter"]

    request.session["product-filter"] = product_filter

    url = reverse("lfs_category", kwargs={"slug": category_slug})
    return HttpResponseRedirect(url)
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/views.py/reset_number_filter