diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index 4d296d0e98..ca6b939458 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -59,8 +59,9 @@ class ClientImpl implements Client { async tx (tx: Tx): Promise { if (tx.objectSpace === core.space.Model) { this.hierarchy.tx(tx) + await this.model.tx(tx) } - await Promise.all([this.conn.tx(tx), this.model.tx(tx)]) + await this.conn.tx(tx) this.notify?.(tx) } diff --git a/plugins/recruit-resources/src/components/EditCandidate.svelte b/plugins/recruit-resources/src/components/EditCandidate.svelte index 78a3ac0b5c..72d6910da0 100644 --- a/plugins/recruit-resources/src/components/EditCandidate.svelte +++ b/plugins/recruit-resources/src/components/EditCandidate.svelte @@ -44,14 +44,14 @@ const query = createQuery() $: query.query(chunter.class.Backlink, { objectId: object._id }, result => { backlinks = result }) - function save() { + async function save() { const attributes: Record = {} for (const key in object) { if ((newValue as any)[key] !== (object as any)[key]) { attributes[key] = (newValue as any)[key] } } - client.updateDoc(recruit.class.Candidate, object.space, object._id, attributes) + await client.updateDoc(recruit.class.Candidate, object.space, object._id, attributes) }