update start numbers
This commit is contained in:
parent
278056f27c
commit
94ae46ddad
|
@ -69,10 +69,18 @@ const convertGroupFieldsToGroupDocuments = async () => {
|
||||||
log('group already converted', group.slug)
|
log('group already converted', group.slug)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for (const contractId of group.contractIds ?? []) {
|
const contractStart = totalContracts - 1 < 0 ? 0 : totalContracts - 1
|
||||||
|
const membersStart = totalMembers - 1 < 0 ? 0 : totalMembers - 1
|
||||||
|
for (const contractId of group.contractIds?.slice(
|
||||||
|
contractStart,
|
||||||
|
group.contractIds?.length
|
||||||
|
) ?? []) {
|
||||||
await createContractIdForGroup(group.id, contractId)
|
await createContractIdForGroup(group.id, contractId)
|
||||||
}
|
}
|
||||||
for (const userId of group.memberIds ?? []) {
|
for (const userId of group.memberIds?.slice(
|
||||||
|
membersStart,
|
||||||
|
group.memberIds?.length
|
||||||
|
) ?? []) {
|
||||||
await createMemberForGroup(group.id, userId)
|
await createMemberForGroup(group.id, userId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user