@@ -26,7 +26,10 @@ export async function getBlastRadiusJobBatch(req: Request, res: Response): Promi
2626 const qx = await getPackagesQx ( )
2727
2828 const analysisRows = await blastRadiusDal . getAnalysisDetailsByIds ( qx , pagedAnalysisIds )
29- const analysisById = new Map ( analysisRows . map ( ( row ) => [ row . id , row ] ) )
29+ // Postgres normalizes uuid columns to lowercase on read, but a requested id can be
30+ // any case (schema only validates uuid shape) — normalize the lookup key so an
31+ // uppercase requestedAnalysisId still matches its (lowercase) row.
32+ const analysisById = new Map ( analysisRows . map ( ( row ) => [ row . id . toLowerCase ( ) , row ] ) )
3033
3134 const doneIds = analysisRows . filter ( ( row ) => row . status === 'done' ) . map ( ( row ) => row . id )
3235 const [ verdictRows , excludedByRangeCounts ] = await Promise . all ( [
@@ -48,7 +51,7 @@ export async function getBlastRadiusJobBatch(req: Request, res: Response): Promi
4851 )
4952
5053 const results : BlastRadiusAnalysisBulkEntry [ ] = pagedAnalysisIds . map ( ( requestedAnalysisId ) => {
51- const analysis = analysisById . get ( requestedAnalysisId )
54+ const analysis = analysisById . get ( requestedAnalysisId . toLowerCase ( ) )
5255 if ( ! analysis ) {
5356 return { requestedAnalysisId, found : false , analysis : null }
5457 }
@@ -58,8 +61,8 @@ export async function getBlastRadiusJobBatch(req: Request, res: Response): Promi
5861 found : true ,
5962 analysis : toBlastRadiusAnalysis (
6063 analysis ,
61- verdictsByAnalysisId . get ( requestedAnalysisId ) ?? [ ] ,
62- excludedByRangeCountByAnalysisId . get ( requestedAnalysisId ) ?? 0 ,
64+ verdictsByAnalysisId . get ( analysis . id ) ?? [ ] ,
65+ excludedByRangeCountByAnalysisId . get ( analysis . id ) ?? 0 ,
6366 ) ,
6467 }
6568 } )
0 commit comments