mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-29 11:12:02 +01:00
Confluence Data Center Edge Cases (#631)
This commit is contained in:
parent
a8b7155b5e
commit
379e71160a
@ -131,7 +131,8 @@ class ConfluenceConnector(LoadConnector, PollConnector):
|
||||
url=self.wiki_base,
|
||||
# passing in username causes issues for Confluence data center
|
||||
username=username if self.is_cloud else None,
|
||||
password=access_token,
|
||||
password=access_token if self.is_cloud else None,
|
||||
token=access_token if not self.is_cloud else None,
|
||||
cloud=self.is_cloud,
|
||||
)
|
||||
return None
|
||||
@ -250,6 +251,13 @@ class ConfluenceConnector(LoadConnector, PollConnector):
|
||||
author = page["version"].get("by", {}).get("email")
|
||||
last_modified = datetime.fromisoformat(last_modified_str)
|
||||
|
||||
if last_modified.tzinfo is None:
|
||||
# If no timezone info, assume it is UTC
|
||||
last_modified = last_modified.replace(tzinfo=timezone.utc)
|
||||
else:
|
||||
# If not in UTC, translate it
|
||||
last_modified = last_modified.astimezone(timezone.utc)
|
||||
|
||||
if time_filter is None or time_filter(last_modified):
|
||||
page_id = page["id"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user