Add defaults to context and pass them before they are removed
This commit is contained in:
@@ -168,12 +168,15 @@ def drilldown_search(request, return_context=False, template=None):
|
||||
|
||||
# Valid sizes
|
||||
context["sizes"] = sizes
|
||||
print("BEFORE REMOVE DEFAULT", query_params)
|
||||
|
||||
# Add any default parameters to the context
|
||||
params_with_defaults = dict(query_params)
|
||||
helpers.add_defaults(params_with_defaults)
|
||||
context["params"] = params_with_defaults
|
||||
|
||||
helpers.remove_defaults(query_params)
|
||||
print("AFTER REMOVE DEFAULT", query_params)
|
||||
url_params = urllib.parse.urlencode(query_params)
|
||||
context["client_uri"] = url_params
|
||||
context["params"] = query_params
|
||||
if "message" in context:
|
||||
if return_context:
|
||||
return context
|
||||
|
||||
Reference in New Issue
Block a user