From eb0e20b9e44ca50c65d3be5f6665cfd22c62c9df Mon Sep 17 00:00:00 2001 From: hagen-danswer Date: Wed, 13 Nov 2024 07:24:29 -0800 Subject: [PATCH] quick fix for google doc sync --- .../danswer/external_permissions/google_drive/doc_sync.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/ee/danswer/external_permissions/google_drive/doc_sync.py b/backend/ee/danswer/external_permissions/google_drive/doc_sync.py index 2e421ad6c95..10792b0ae7f 100644 --- a/backend/ee/danswer/external_permissions/google_drive/doc_sync.py +++ b/backend/ee/danswer/external_permissions/google_drive/doc_sync.py @@ -110,8 +110,13 @@ def _get_permissions_from_slim_doc( elif permission_type == "group": group_emails.add(permission["emailAddress"]) elif permission_type == "domain" and company_domain: - if permission["domain"] == company_domain: + if permission.get("domain") == company_domain: public = True + else: + logger.warning( + "Permission is type domain but does not match company domain:" + f"\n {permission}" + ) elif permission_type == "anyone": public = True