User groups can be missing, this was previously allowed.
This commit is contained in:
parent
9c26c21735
commit
0252dd3188
|
@ -249,7 +249,7 @@ export class DatabaseImpl implements Database {
|
||||||
if (!opts?.allowMissing && someMissing) {
|
if (!opts?.allowMissing && someMissing) {
|
||||||
const missing = response.rows.filter(row => rowUnavailable(row))
|
const missing = response.rows.filter(row => rowUnavailable(row))
|
||||||
const missingIds = missing.map(row => row.key).join(", ")
|
const missingIds = missing.map(row => row.key).join(", ")
|
||||||
throw new Error(`Unable to get documents: ${missingIds}`)
|
throw new Error(`Unable to get bulk documents: ${missingIds}`)
|
||||||
}
|
}
|
||||||
return rows.map(row => (includeDocs ? row.doc! : row.value))
|
return rows.map(row => (includeDocs ? row.doc! : row.value))
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const hasAppBuilderPermissions = sdk.users.hasAppBuilderPermissions
|
||||||
async function getGroups(groupIds: string[]) {
|
async function getGroups(groupIds: string[]) {
|
||||||
if (groupIds.length) {
|
if (groupIds.length) {
|
||||||
const db = context.getGlobalDB()
|
const db = context.getGlobalDB()
|
||||||
return await db.getMultiple<UserGroup>(groupIds)
|
return await db.getMultiple<UserGroup>(groupIds, { allowMissing: true })
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit a1903c9b8c5985f72ddb33b40b4a37521aaf8fa0
|
Subproject commit 6dc5a3071bd37c54a0977cde0d54569f3c972ad3
|
Loading…
Reference in New Issue