Skip to content

Commit

Permalink
fix(business-transfer): disconnect citizen from vehicle (closes #1944)
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Jun 10, 2024
1 parent b68355a commit 7603a2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/api/src/controllers/citizen/vehicles-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ export class VehiclesController {
const updatedVehicle = await prisma.registeredVehicle.update({
where: { id: vehicle.id },
data: {
citizen: vehicle.citizenId ? { disconnect: { id: vehicle.citizenId } } : undefined,
Business: { connect: { id: data.businessId } },
},
});
Expand Down

0 comments on commit 7603a2d

Please sign in to comment.