diff --git a/client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx b/client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx index bf77aa71fc..3ff5a89b48 100644 --- a/client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx +++ b/client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx @@ -156,23 +156,25 @@ const DynamicAssessmentActionsRow: FunctionComponent< }; const takeAssessment = async () => { - if (!isArchetype && application?.archetypes?.length) { - for (const archetypeRef of application.archetypes) { - try { - createAssessment(); - } catch (error) { - console.error( - `Error fetching archetype with ID ${archetypeRef.id}:`, - error - ); - pushNotification({ - title: t("terms.error"), - variant: "danger", - }); - } - } - } else { + try { createAssessment(); + } catch (error) { + if (isArchetype) { + console.error( + `Error fetching archetype with ID ${archetype?.id}:`, + error + ); + } else { + console.error( + `Error fetching application with ID ${application?.id}:`, + error + ); + } + + pushNotification({ + title: t("terms.error"), + variant: "danger", + }); } };