Explorar o código

add condition

Shun Miyazawa %!s(int64=5) %!d(string=hai) anos
pai
achega
a7a2824984
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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));
     }