fix: nonetype local url fixed

This commit is contained in:
Tanmoy Sarkar 2024-01-08 22:05:06 +05:30
parent 0bf2b78363
commit 2b68d3e54d

View file

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