mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-02 13:52:40 +00:00
Fix unfinished meetings (#7198)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
eac3f840aa
commit
b4bde9ceac
@ -259,7 +259,10 @@ async function finishMeetingMinutes (
|
|||||||
): Promise<Tx[]> {
|
): Promise<Tx[]> {
|
||||||
const res: Tx[] = []
|
const res: Tx[] = []
|
||||||
const roomInfos = await control.queryFind(control.ctx, love.class.RoomInfo, {})
|
const roomInfos = await control.queryFind(control.ctx, love.class.RoomInfo, {})
|
||||||
const roomInfo = roomInfos.find((ri) => ri.persons.includes(info.person))
|
const roomInfo =
|
||||||
|
tx._class === core.class.TxRemoveDoc
|
||||||
|
? roomInfos.find((it) => it.room === info.room)
|
||||||
|
: roomInfos.find((ri) => ri.persons.includes(info.person))
|
||||||
|
|
||||||
if (roomInfo === undefined) {
|
if (roomInfo === undefined) {
|
||||||
return res
|
return res
|
||||||
|
@ -83,15 +83,15 @@ export class DomainTxMiddleware extends BaseMiddleware implements Middleware {
|
|||||||
if (toDelete.length > 0) {
|
if (toDelete.length > 0) {
|
||||||
const deleteByDomain = groupByArray(toDelete, (it) => this.context.hierarchy.getDomain(it.objectClass))
|
const deleteByDomain = groupByArray(toDelete, (it) => this.context.hierarchy.getDomain(it.objectClass))
|
||||||
|
|
||||||
for (const [d, docs] of deleteByDomain.entries()) {
|
for (const [domain, domainTxes] of deleteByDomain.entries()) {
|
||||||
const todel = await ctx.with(
|
const todel = await ctx.with(
|
||||||
'adapter-load',
|
'adapter-load',
|
||||||
{},
|
{},
|
||||||
() =>
|
() =>
|
||||||
adapter.load(
|
adapter.load(
|
||||||
ctx,
|
ctx,
|
||||||
d,
|
domain,
|
||||||
docs.map((it) => it._id)
|
domainTxes.map((it) => it.objectId)
|
||||||
),
|
),
|
||||||
{ count: toDelete.length }
|
{ count: toDelete.length }
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user