From 219fdecc50aea9ee6c978799cdc8cb37bcc69200 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 8b54330787..f5a2bad56c 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) {