forked from jappel/leistungsbilanz-ts
Make device row moves atomic
This commit is contained in:
parent
a6837d7242
commit
cf356bbedc
7 changed files with 440 additions and 247 deletions
|
|
@ -334,7 +334,7 @@ export class CircuitWriteService {
|
|||
return this.deviceRowRepository.findById(rowId);
|
||||
}
|
||||
|
||||
this.deviceRowRepository.moveRowsTransactional({
|
||||
this.getDeviceRowTransactionStore().moveRows({
|
||||
rows: [{ id: row.id, expectedCircuitId: row.circuitId }],
|
||||
targetCircuitId: targetCircuit?.id,
|
||||
createTargetCircuit,
|
||||
|
|
@ -415,7 +415,7 @@ export class CircuitWriteService {
|
|||
}
|
||||
}
|
||||
|
||||
return this.deviceRowRepository.moveRowsTransactional({
|
||||
return this.getDeviceRowTransactionStore().moveRows({
|
||||
rows: rows.map((row) => ({ id: row.id, expectedCircuitId: row.circuitId })),
|
||||
targetCircuitId: targetCircuit?.id,
|
||||
createTargetCircuit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue