Fix specifying folders for Google Drive connector

This commit is contained in:
Weves 2023-07-26 21:35:19 -07:00 committed by Chris Weaver
parent 1a22666810
commit 9e6467a0c9

View File

@ -192,10 +192,9 @@ class GoogleDriveConnector(LoadConnector, PollConnector):
found_parent_id = get_folder_id( found_parent_id = get_folder_id(
service=service, parent_id=parent_id, folder_name=folder_name service=service, parent_id=parent_id, folder_name=folder_name
) )
if parent_id is None: if found_parent_id is None:
raise ValueError( raise ValueError(f"Folder path '{path}' not found in Google Drive")
f"Folder '{folder_name}' in path '{path}' not found in Google Drive" parent_id = found_parent_id
)
folder_ids.append(parent_id) folder_ids.append(parent_id)
return folder_ids return folder_ids