mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 19:44:57 +02:00
Fix cockroach (#6965)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -117,7 +117,7 @@ async function createPersonSpace (
|
||||
person: Ref<Person>,
|
||||
control: TriggerControl
|
||||
): Promise<TxCUD<PersonSpace>[]> {
|
||||
const personSpace = (await control.findAll(control.ctx, contact.class.PersonSpace, { person }, { limit: 1 })).shift()
|
||||
const personSpace = (await control.findAll(control.ctx, contact.class.PersonSpace, { person }, { limit: 1 }))[0]
|
||||
if (personSpace !== undefined) {
|
||||
const toAdd = account.filter((it) => !personSpace.members.includes(it))
|
||||
if (toAdd.length === 0) return []
|
||||
|
||||
Reference in New Issue
Block a user