This commit is contained in:
Flatlogic Bot 2026-06-25 16:52:23 +00:00
parent 5dfc25ec83
commit fd271763d9

View File

@ -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);
}
});