From 1d639faf1503bf2d826bb22bb9a63e8e8e7871be Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 13 May 2018 16:52:47 +0900 Subject: [PATCH] Fix bug --- src/services/drive/add-file.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts index 8b5433078..f5a2bad56 100644 --- a/src/services/drive/add-file.ts +++ b/src/services/drive/add-file.ts @@ -118,7 +118,8 @@ const addFile = async ( // Check if there is a file with the same hash const much = await DriveFile.findOne({ md5: hash, - 'metadata.userId': user._id + 'metadata.userId': user._id, + deletedAt: { $exists: false } }); if (much !== null) {