Skip to content

Commit

Permalink
fix: check that query_string isn't null before trying to use it
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil Narang <[email protected]>
  • Loading branch information
akhilnarang committed Jul 24, 2024
1 parent 8297937 commit 1d46f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/website/path_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def resolve_redirect(path, query_string=None):
for rule in redirects:
pattern = rule["source"].strip("/ ") + "$"
path_to_match = path
if rule.get("match_with_query_string"):
if query_string and rule.get("match_with_query_string"):
path_to_match = path + "?" + frappe.safe_decode(query_string)

try:
Expand Down

0 comments on commit 1d46f03

Please sign in to comment.