From f06df3950fef7fb7bd286478dc2220cbf57291ec Mon Sep 17 00:00:00 2001 From: "Mariana R. Santos" Date: Fri, 13 Dec 2024 16:02:49 +0100 Subject: [PATCH] Fetch inspection using isar inspection Id --- backend/api/Controllers/InspectionController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/api/Controllers/InspectionController.cs b/backend/api/Controllers/InspectionController.cs index 9fafd441..a9af404d 100644 --- a/backend/api/Controllers/InspectionController.cs +++ b/backend/api/Controllers/InspectionController.cs @@ -83,15 +83,15 @@ public async Task> GetInspectionImageById([FromRoute] s return StatusCode(StatusCodes.Status500InternalServerError); } - if (inspection.Id == null) return NotFound($"Could not find Id for Inspection with task ID {taskId}."); + if (inspection.IsarTaskId == null) return NotFound($"Could not find isar inspection Id for Inspection with task ID {taskId}."); - var inspectionData = await inspectionService.GetInspectionStorageInfo(inspection.Id); + var inspectionData = await inspectionService.GetInspectionStorageInfo(inspection.IsarTaskId); - if (inspectionData == null) return NotFound($"Could not find inspection data for inspection with Id {inspection.Id}."); + if (inspectionData == null) return NotFound($"Could not find inspection data for inspection with Id {inspection.IsarTaskId}."); if (!inspectionData.BlobContainer.ToLower(CultureInfo.CurrentCulture).Equals(installationCode.ToLower(CultureInfo.CurrentCulture), StringComparison.Ordinal)) { - return NotFound($"Could not find inspection data for inspection with Id {inspection.Id} because blob name {inspectionData.BlobName} does not match installation {installationCode}."); + return NotFound($"Could not find inspection data for inspection with Id {inspection.IsarTaskId} because blob name {inspectionData.BlobName} does not match installation {installationCode}."); } try