소스 검색

BugFix: removeWithSubstanceById

Yuki Takei 7 년 전
부모
커밋
336ed1e5a5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/server/models/attachment.js

+ 1 - 1
src/server/models/attachment.js

@@ -93,7 +93,7 @@ module.exports = function(crowi) {
     // retrieve data from DB to get a completely populated instance
     const attachment = await this.findById(id);
     await fileUploader.deleteFile(attachment);
-    return await this.remove();
+    return await attachment.remove();
   };
 
   return mongoose.model('Attachment', attachmentSchema);