diff --git a/lib/www/server/lib/db/qc/results/get.js b/lib/www/server/lib/db/qc/results/get.js index eaf274c..eab775e 100644 --- a/lib/www/server/lib/db/qc/results/get.js +++ b/lib/www/server/lib/db/qc/results/get.js @@ -67,7 +67,7 @@ function makeTree (leaf, sequences, shots) { async function get (projectId, sequenceId, opts = {}) { const client = await setSurvey(projectId); - const tree = await definitions.get(projectId); + const tree = await definitions.get(projectId) ?? []; const shots = await getShots(client, sequenceId); const sequences = await getSequences(client, sequenceId); diff --git a/lib/www/server/lib/qc/index.js b/lib/www/server/lib/qc/index.js index 038b773..50acc31 100644 --- a/lib/www/server/lib/qc/index.js +++ b/lib/www/server/lib/qc/index.js @@ -73,7 +73,7 @@ async function main () { console.log("currentQCHash != lastQCHash", projectId, currentQCHash, lastQCHash); // Fetch definitions and parameters - const { definitions, parameters } = await getProjectQCConfig(projectId); + const { definitions, parameters } = await getProjectQCConfig(projectId) ?? {}; if (definitions && parameters) { console.log("PROJECT ID", projectId);