From 2b68d3e54de41ba82963583c1536ce37ae20c0f4 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Mon, 8 Jan 2024 22:05:06 +0530 Subject: [PATCH] fix: nonetype local url fixed --- frappe/push_notification.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/push_notification.py b/frappe/push_notification.py index 85703ffcca..8a15198650 100644 --- a/frappe/push_notification.py +++ b/frappe/push_notification.py @@ -252,7 +252,8 @@ class PushNotification: # Webhook which will be called by the central relay server for authentication @frappe.whitelist(allow_guest=True, methods=["GET"]) def auth_webhook(): - token = frappe.cache().get_value(f"{frappe.local.site}:push_relay_registration_token") + url = urlparse(frappe.utils.get_url()).hostname + token = frappe.cache().get_value(f"{url}:push_relay_registration_token") response = Response() response.mimetype = "text/plain; charset=UTF-8"