From 5f08d3d2c817baf6c81efc491697bdf6a797b97c Mon Sep 17 00:00:00 2001 From: Kevin Glisson Date: Wed, 20 Dec 2023 14:25:05 -0800 Subject: [PATCH] Moves deleted documents to trash instead of immediately deleting them --- .vscode/settings.json | 2 +- src/dispatch/plugins/dispatch_google/drive/drive.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5cfc5c7fc6b6..b8d00b662cbd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -39,7 +39,7 @@ ], "[python]": { "editor.codeActionsOnSave": { - "source.organizeImports": false + "source.organizeImports": "never" } }, } 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(