Shun Miyazawa %!s(int64=3) %!d(string=hai) anos
pai
achega
88a9b5732d
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      packages/app/src/server/service/attachment.js

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

@@ -81,7 +81,11 @@ class AttachmentService {
 
 
   async isBrandLogoExist() {
   async isBrandLogoExist() {
     const Attachment = this.crowi.model('Attachment');
     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;
   }
   }
 
 
 }
 }