Skip to content

Commit

Permalink
Use new include_query_params method
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Apr 10, 2023
1 parent 0446e81 commit 17428ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions postcode_lookup/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ async def base_uprn_endpoint(request: Request, backend=None):
).get_uprn(uprn)
except InvalidUPRNException:
return RedirectResponse(
request.url_for(backend.URL_PREFIX + "_postcode_form_en")
+ "?invalid-uprn=1"
request.url_for(
backend.URL_PREFIX + "_postcode_form_en"
).include_query_params(**{"invalid-uprn": 1})
)
context = results_context(api_response)
context["request"] = request
Expand Down

0 comments on commit 17428ee

Please sign in to comment.