diff --git a/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java b/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java index 88eafd528..55688a62e 100644 --- a/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java +++ b/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java @@ -92,6 +92,8 @@ public SBApiResponse retakeAssessment(String assessmentIdentifier, String token, if (serverProperties.isAssessmentRetakeCountVerificationEnabled()) { retakeAttemptsConsumed = calculateAssessmentRetakeCount(userId, assessmentIdentifier); + if(retakeAttemptsConsumed > 0) + retakeAttemptsConsumed = retakeAttemptsConsumed-1; } } catch (Exception e) { errMsg = String.format("Error while calculating retake assessment. Exception: %s", e.getMessage());