From 7467707da4ecaabf23a786dbafc81c4d6c4a871e Mon Sep 17 00:00:00 2001 From: Stan Girard Date: Sun, 9 Jun 2024 19:01:36 +0200 Subject: [PATCH] fix: files_metadata (#2645) # Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate): --- backend/modules/sync/entity/sync.py | 2 +- backend/modules/sync/utils/googleutils.py | 1 + backend/modules/sync/utils/sharepointutils.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/modules/sync/entity/sync.py b/backend/modules/sync/entity/sync.py index f0f320376..e6d74bc0a 100644 --- a/backend/modules/sync/entity/sync.py +++ b/backend/modules/sync/entity/sync.py @@ -20,7 +20,7 @@ class SyncsActive(BaseModel): last_synced: datetime sync_interval_minutes: int brain_id: str - syncs_user: Optional[SyncsUser] + syncs_user: Optional[SyncsUser] = None class SyncsFiles(BaseModel): diff --git a/backend/modules/sync/utils/googleutils.py b/backend/modules/sync/utils/googleutils.py index 3a6cc64a3..f0acf5c63 100644 --- a/backend/modules/sync/utils/googleutils.py +++ b/backend/modules/sync/utils/googleutils.py @@ -266,6 +266,7 @@ class GoogleSyncUtils(BaseModel): folders = settings.get("folders", []) files_to_download = settings.get("files", []) files = [] + files_metadata = [] if len(folders) > 0: files = [] for folder in folders: diff --git a/backend/modules/sync/utils/sharepointutils.py b/backend/modules/sync/utils/sharepointutils.py index 3adb2b375..997c5aec1 100644 --- a/backend/modules/sync/utils/sharepointutils.py +++ b/backend/modules/sync/utils/sharepointutils.py @@ -260,6 +260,7 @@ class AzureSyncUtils(BaseModel): folders = settings.get("folders", []) files_to_download = settings.get("files", []) files = [] + files_metadata = [] if len(folders) > 0: files = [] for folder in folders: