Skip to content

Commit dfb7605

Browse files
authored
Merge branch 'main' into mta-1907
2 parents 6b98ee5 + 2de18b7 commit dfb7605

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

client/src/app/pages/assessment/components/assessment-actions/components/dynamic-assessment-actions-row.tsx

+18-16
Original file line numberDiff line numberDiff line change
@@ -156,23 +156,25 @@ const DynamicAssessmentActionsRow: FunctionComponent<
156156
};
157157

158158
const takeAssessment = async () => {
159-
if (!isArchetype && application?.archetypes?.length) {
160-
for (const archetypeRef of application.archetypes) {
161-
try {
162-
createAssessment();
163-
} catch (error) {
164-
console.error(
165-
`Error fetching archetype with ID ${archetypeRef.id}:`,
166-
error
167-
);
168-
pushNotification({
169-
title: t("terms.error"),
170-
variant: "danger",
171-
});
172-
}
173-
}
174-
} else {
159+
try {
175160
createAssessment();
161+
} catch (error) {
162+
if (isArchetype) {
163+
console.error(
164+
`Error fetching archetype with ID ${archetype?.id}:`,
165+
error
166+
);
167+
} else {
168+
console.error(
169+
`Error fetching application with ID ${application?.id}:`,
170+
error
171+
);
172+
}
173+
174+
pushNotification({
175+
title: t("terms.error"),
176+
variant: "danger",
177+
});
176178
}
177179
};
178180

0 commit comments

Comments
 (0)