Yuki Takei 7 лет назад
Родитель
Сommit
124bbd31f8
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      lib/models/page.js

+ 2 - 2
lib/models/page.js

@@ -839,12 +839,12 @@ module.exports = function(crowi) {
       return UserGroupRelation.findByGroupIdAndUser(grantUserGroupId, userData)
       return UserGroupRelation.findByGroupIdAndUser(grantUserGroupId, userData)
       .then((relation) => {
       .then((relation) => {
         if (relation == null) {
         if (relation == null) {
-          return reject(new Error('no relations were exist for group and user.'));
+          return new Error('no relations were exist for group and user.');
         }
         }
         return PageGroupRelation.findOrCreateRelationForPageAndGroup(page, relation.relatedGroup);
         return PageGroupRelation.findOrCreateRelationForPageAndGroup(page, relation.relatedGroup);
       })
       })
       .catch((err) => {
       .catch((err) => {
-        return reject(new Error('No UserGroup is exists. userGroupId : ', grantUserGroupId));
+        return new Error('No UserGroup is exists. userGroupId : ', grantUserGroupId);
       });
       });
     }
     }
     else {
     else {