Ver Fonte

add condition

Shun Miyazawa há 4 anos atrás
pai
commit
a7a2824984
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/server/routes/apiv3/users.js

+ 1 - 1
src/server/routes/apiv3/users.js

@@ -404,7 +404,7 @@ module.exports = (crowi) => {
 
     // Create users
     const afterWorkEmailList = await User.createUsersByEmailList(req.body.shapedEmailList);
-    if (afterWorkEmailList.failedToCreateUserEmailList.length > 0) {
+    if (afterWorkEmailList.failedToCreateUserEmailList.length > 0 && afterWorkEmailList.createdUserList.length === 0) {
       return res.apiv3Err(new ErrorV3('Failed to create user', afterWorkEmailList.failedToCreateUserEmailList));
     }