From fd271763d956b3379449bb8f00041a25bc3a4ec7 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 25 Jun 2026 16:52:23 +0000 Subject: [PATCH] V2 --- backend/src/routes/interviewWorkflow.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/src/routes/interviewWorkflow.js b/backend/src/routes/interviewWorkflow.js index e8650c2..e5700d1 100644 --- a/backend/src/routes/interviewWorkflow.js +++ b/backend/src/routes/interviewWorkflow.js @@ -122,13 +122,12 @@ router.get('/analysis', wrapAsync(async (req, res) => { findingCounts[type] = (findingCounts[type] || 0) + 1; }); - try { - const parsed = JSON.parse(interview.inference_notes || '{}'); + const inferenceNotes = String(interview.inference_notes || '').trim(); + if (inferenceNotes.startsWith('{')) { + const parsed = JSON.parse(inferenceNotes); (parsed.tags || []).forEach((tag) => { tagCounts[tag] = (tagCounts[tag] || 0) + 1; }); - } catch (error) { - console.error('Failed to parse interview inference notes', error); } });