From 1c7864c6ba49d86014178dfa6d1d7c0cd7fa128a Mon Sep 17 00:00:00 2001 From: kevgliss Date: Wed, 17 Jan 2024 15:47:12 -0800 Subject: [PATCH] Moves deleted documents to trash instead of immediately deleting them (#4158) --- src/dispatch/plugins/dispatch_google/drive/drive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dispatch/plugins/dispatch_google/drive/drive.py b/src/dispatch/plugins/dispatch_google/drive/drive.py index d74fa5e8b13a..c66985388dd9 100644 --- a/src/dispatch/plugins/dispatch_google/drive/drive.py +++ b/src/dispatch/plugins/dispatch_google/drive/drive.py @@ -276,7 +276,7 @@ def copy_file(client: Any, folder_id: str, file_id: str, new_file_name: str): def delete_file(client: Any, file_id: str): """Deletes a folder or file from a Google Drive.""" - return make_call(client.files(), "delete", fileId=file_id, supportsAllDrives=True) + return make_call(client.files(), "trash", fileId=file_id, supportsAllDrives=True) def mark_as_readonly(