Skip to content

Commit

Permalink
Save correct document url from document360 (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
VikasNeha committed May 2, 2024
1 parent 577c870 commit 143b50c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/danswer/connectors/document360/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# 2. Only the HTML Articles are supported, Document360 also has a Markdown and "Block" format
# 3. The contents are not as cleaned up as other HTML connectors

DOCUMENT360_BASE_URL = "https://preview.portal.document360.io/"
DOCUMENT360_BASE_URL = "https://portal.document360.io"
DOCUMENT360_API_BASE_URL = "https://apihub.document360.io/v2"


Expand Down Expand Up @@ -142,7 +142,11 @@ def _process_articles(
if author["email_id"]
]

doc_link = f"{DOCUMENT360_BASE_URL}/{self.portal_id}/document/v1/view/{article['id']}"
doc_link = (
article_details["url"]
if article_details.get("url")
else f"{DOCUMENT360_BASE_URL}/{self.portal_id}/document/v1/view/{article['id']}"
)

html_content = article_details["html_content"]
article_content = (
Expand Down

0 comments on commit 143b50c

Please sign in to comment.