Get user groups, allow missing.
This commit is contained in:
parent
a7c7a94760
commit
4ff338f655
|
@ -25,10 +25,8 @@ export async function creatorsInList(
|
|||
users.filter(user => user.userGroups).flatMap(user => user.userGroups!)
|
||||
),
|
||||
]
|
||||
if (groupIds.length) {
|
||||
const db = context.getGlobalDB()
|
||||
groups = await db.getMultiple<UserGroup>(groupIds)
|
||||
}
|
||||
groups = await db.getMultiple<UserGroup>(groupIds, { allowMissing: true })
|
||||
return users.map(user => isCreatorSync(user, groups))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue