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

This commit is contained in:
2024-10-08 11:03:20 +03:00
parent 28ac95fd47
commit 353106ee17
2 changed files with 3 additions and 4 deletions

View File

@@ -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