fix: orderIndex update to scope by collection ID (#5365)
This commit is contained in:
parent
bc2e5eb0bb
commit
aac4c5b34b
1 changed files with 4 additions and 1 deletions
|
|
@ -119,7 +119,10 @@ export class TeamRequestService {
|
|||
await this.prisma.lockTableExclusive(tx, 'TeamRequest');
|
||||
|
||||
await tx.teamRequest.updateMany({
|
||||
where: { orderIndex: { gte: dbTeamReq.orderIndex } },
|
||||
where: {
|
||||
collectionID: dbTeamReq.collectionID,
|
||||
orderIndex: { gte: dbTeamReq.orderIndex },
|
||||
},
|
||||
data: { orderIndex: { decrement: 1 } },
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue