shinoka7 il y a 6 ans
Parent
commit
aa45994744
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/server/models/attachment.js

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

@@ -97,6 +97,7 @@ module.exports = function(crowi) {
     // retrieve data from DB to get a completely populated instance
     // retrieve data from DB to get a completely populated instance
     const attachment = await this.findById(id);
     const attachment = await this.findById(id);
     await fileUploader.deleteFile(attachment);
     await fileUploader.deleteFile(attachment);
+    // remove the image attachment from all user(s)
     const User = await crowi.model('User');
     const User = await crowi.model('User');
     await User.update({ imageAttachment: id }, {
     await User.update({ imageAttachment: id }, {
       $set: {
       $set: {