diff --git a/apps/api/src/controllers/citizen/vehicles-controller.ts b/apps/api/src/controllers/citizen/vehicles-controller.ts index 3d3f96471..ebcf6476d 100644 --- a/apps/api/src/controllers/citizen/vehicles-controller.ts +++ b/apps/api/src/controllers/citizen/vehicles-controller.ts @@ -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 } }, }, });