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

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-11-19 19:30:24 +04:00 committed by GitHub
parent eac3f840aa
commit b4bde9ceac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -259,7 +259,10 @@ async function finishMeetingMinutes (
): Promise<Tx[]> {
const res: Tx[] = []
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) {
return res

View File

@ -83,15 +83,15 @@ export class DomainTxMiddleware extends BaseMiddleware implements Middleware {
if (toDelete.length > 0) {
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(
'adapter-load',
{},
() =>
adapter.load(
ctx,
d,
docs.map((it) => it._id)
domain,
domainTxes.map((it) => it.objectId)
),
{ count: toDelete.length }
)