You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/15 15:14:20 UTC

[GitHub] [airflow] pankajastro commented on a diff in pull request #24446: make exists() method on GoogleDriveHook return false for files that are trashed

pankajastro commented on code in PR #24446:
URL: https://github.com/apache/airflow/pull/24446#discussion_r898110720


##########
airflow/providers/google/suite/hooks/drive.py:
##########
@@ -172,12 +174,13 @@ def get_file_id(self, folder_id: str, file_name: str, drive_id: Optional[str] =
         else:
             files = (
                 service.files()
-                .list(q=query, spaces="drive", fields="files(id, mimeType)", orderBy="modifiedTime desc")
+                .list(q=query, spaces="drive", fields="files(id, mimeType, trashed)", orderBy="modifiedTime desc")
                 .execute(num_retries=self.num_retries)
             )
+        print(files)

Review Comment:
   Please remove print statement



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org