From b9feba2ca4252b96a7d11d61fb4ac91e4caa3d79 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:42:03 -0800 Subject: [PATCH] Simplify unlink --- src/documents/tasks.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/documents/tasks.py b/src/documents/tasks.py index 2c325b515..c12944b55 100644 --- a/src/documents/tasks.py +++ b/src/documents/tasks.py @@ -721,11 +721,7 @@ def build_share_link_bundle(bundle_id: int): pass raise finally: - if temp_zip_path.exists(): - try: - temp_zip_path.unlink() - except OSError: - pass + temp_zip_path.unlink(missing_ok=True) @shared_task