Taichi Masuyama преди 3 години
родител
ревизия
e8a7b22468
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      packages/app/src/server/service/page-grant.ts

+ 2 - 1
packages/app/src/server/service/page-grant.ts

@@ -560,7 +560,8 @@ class PageGrantService {
       }
       const UserGroupRelation = mongoose.model('UserGroupRelation') as any; // TODO: Typescriptize model
       const userIds = await UserGroupRelation.findAllUserIdsForUserGroup(grantUserGroupId);
-      const childrenOrItselfGroupIds = await UserGroup.findGroupsWithDescendantsById(grantUserGroupId).map(d => d._id);
+      const childrenOrItselfGroups = await UserGroup.findGroupsWithDescendantsById(grantUserGroupId);
+      const childrenOrItselfGroupIds = childrenOrItselfGroups.map(d => d._id);
 
       updateGrantInfo = {
         grant: PageGrant.GRANT_USER_GROUP,