diff --git a/api/src/certification/enrolment/domain/usecases/verify-candidate-subscriptions.js b/api/src/certification/enrolment/domain/usecases/verify-candidate-subscriptions.js index 4ea1d3ac690..e561264d201 100644 --- a/api/src/certification/enrolment/domain/usecases/verify-candidate-subscriptions.js +++ b/api/src/certification/enrolment/domain/usecases/verify-candidate-subscriptions.js @@ -63,11 +63,15 @@ export async function verifyCandidateSubscriptions({ const subscribedHighestBadgeAcquisition = _getSubscribedHighestBadgeAcquisition(userAcquiredBadges, candidate); + // PB CE NE SONT PAS DES BADGES QUI CORRESPONDENT A LA BDD (PAS DE DETACHEDAT, NI CE COMPLE_CERT_ID) ET ON S'EN FOUT DU OFFSET ET CURRENT ICI + // LE MODELE RENVOYE NE CORRESPOND PAS AU BESOIN + // LE REPO UTILISE ICI NE FAIT PAS VRAIMENT CE QUI EST ATTENDU DE BASE MAIS PAS BLOQUANT POUR CETTE PR const complementaryCertificationBadges = await complementaryCertificationBadgeRepository.findAll(); const userComplementaryCertificationBadgesSortedByLevel = _getSubscribedComplementaryCertificationBadgesSortedByLevel(complementaryCertificationBadges, candidate); + // ON DEVRAIT FILTRER SUBSCRIBED.CCBADGID === complementaryCertificationBadges.ID ET NE PAS FAIRE LA LIGNE DU DESSUS const subscribedComplementaryCertificationBadge = _getSubscribedComplementaryCertificationBadge( userComplementaryCertificationBadgesSortedByLevel, subscribedHighestBadgeAcquisition, @@ -87,6 +91,7 @@ export async function verifyCandidateSubscriptions({ } function _isSubscribedUserBadgeOutDated(subscribedComplementaryCertificationBadge) { + // PAS DE DETACHEDAT return subscribedComplementaryCertificationBadge?.detachedAt !== null; }