2
0
Shun Miyazawa 3 жил өмнө
parent
commit
88a9b5732d

+ 5 - 1
packages/app/src/server/service/attachment.js

@@ -81,7 +81,11 @@ class AttachmentService {
 
   async isBrandLogoExist() {
     const Attachment = this.crowi.model('Attachment');
-    return await Attachment.findOne({ attachmentType: AttachmentType.BRAND_LOGO }) != null;
+
+    const query = { attachmentType: AttachmentType.BRAND_LOGO };
+    const count = await Attachment.countDocuments(query);
+
+    return count >= 1;
   }
 
 }