diff --git a/app/controller/measurements.py b/app/controller/measurements.py index 94ea350..daea70f 100644 --- a/app/controller/measurements.py +++ b/app/controller/measurements.py @@ -1,5 +1,6 @@ from fastapi import status from fastapi.responses import JSONResponse +from fastapi.encoders import jsonable_encoder from service.measurements import MeasurementsService from service.plants import PlantsService from schemas.measurement import MeasurementSavedSchema @@ -72,7 +73,9 @@ def handle_delete_device_plant_relation(self, type_id, id): if response: return JSONResponse( status_code=status.HTTP_200_OK, - content=response + content=jsonable_encoder({ + "message": "Device plant relation deleted successfully.", + }), ) return JSONResponse( status_code=status.HTTP_204_NO_CONTENT,