Merge pull request #27200 from akhilnarang/fix-check-query-string-null

fix: check that query_string isn't null before trying to use it
This commit is contained in:
Akhil Narang 2024-07-25 19:29:04 +05:30 committed by GitHub
commit 9978d61a32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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