mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Handle automation calling url of both url and string type
Calling url can be of url type in production but locally it is of string type. Unclear why. But this change should mitigate the issue for now.
This commit is contained in:
@@ -2174,7 +2174,7 @@ def scheduled_chat(
|
||||
scheduling_request: str,
|
||||
subject: str,
|
||||
user: KhojUser,
|
||||
calling_url: str,
|
||||
calling_url: str | URL,
|
||||
job_id: str = None,
|
||||
conversation_id: str = None,
|
||||
):
|
||||
@@ -2194,8 +2194,8 @@ def scheduled_chat(
|
||||
return
|
||||
|
||||
# Extract relevant params from the original URL
|
||||
parsed_url = urlparse(calling_url)
|
||||
scheme = parsed_url.scheme
|
||||
parsed_url = URL(calling_url) if isinstance(calling_url, str) else calling_url
|
||||
scheme = "http" if not parsed_url.is_secure else "https"
|
||||
query_dict = parse_qs(parsed_url.query)
|
||||
|
||||
# Pop the stream value from query_dict if it exists
|
||||
|
||||
Reference in New Issue
Block a user