Fixed a facet filter bug where redundant code would error out depending on the query.
All checks were successful
StarFields Django Rest Framework Generics / build (push) Successful in 12s
All checks were successful
StarFields Django Rest Framework Generics / build (push) Successful in 12s
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "starfields-drf-generics"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
authors = [
|
||||
{ name="Anastasios Svolis", email="support@starfields.gr" },
|
||||
]
|
||||
@@ -18,7 +18,7 @@ classifiers = [
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "https://git.vickys-corner.xyz/ace/starfields-drf-generics"
|
||||
"Homepage" = "https://git.starfieldsweb.com/StarFields/starfields-drf-generics"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["starfields_drf_generics"]
|
||||
|
||||
@@ -334,8 +334,7 @@ class FacetFilter(BaseFilterBackend):
|
||||
|
||||
if view.facets:
|
||||
for facet in view.facets:
|
||||
request_slug = request.query_params[facet.slug]
|
||||
if facet.slug in request.query_params.keys() and request_slug:
|
||||
if facet.slug in request.query_params.keys():
|
||||
tag_filterlist = request.query_params.get(facet.slug)
|
||||
if tag_filterlist == '':
|
||||
# If the tag filterlist is empty then we're not
|
||||
|
||||
Reference in New Issue
Block a user