Skip to content

Commit

Permalink
chore: run format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Nov 27, 2024
1 parent 52b3c0c commit 18e283d
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2954,21 +2954,25 @@ def infer_result(
self, mapping: RequirementMapping, source_requirement_assessment: Self
) -> dict | None:
if mapping.coverage == RequirementMapping.Coverage.FULL:
if (source_requirement_assessment.compliance_assessment.min_score == self.compliance_assessment.min_score and
source_requirement_assessment.compliance_assessment.max_score == self.compliance_assessment.max_score):
return {
"result": source_requirement_assessment.result,
"status": source_requirement_assessment.status,
"score": source_requirement_assessment.score,
"is_scored": source_requirement_assessment.is_scored,
"observation": source_requirement_assessment.observation,
}
else:
return {
"result": source_requirement_assessment.result,
"status": source_requirement_assessment.status,
"observation": source_requirement_assessment.observation,
}
if (
source_requirement_assessment.compliance_assessment.min_score
== self.compliance_assessment.min_score
and source_requirement_assessment.compliance_assessment.max_score
== self.compliance_assessment.max_score
):
return {
"result": source_requirement_assessment.result,
"status": source_requirement_assessment.status,
"score": source_requirement_assessment.score,
"is_scored": source_requirement_assessment.is_scored,
"observation": source_requirement_assessment.observation,
}
else:
return {
"result": source_requirement_assessment.result,
"status": source_requirement_assessment.status,
"observation": source_requirement_assessment.observation,
}
if mapping.coverage == RequirementMapping.Coverage.PARTIAL:
if source_requirement_assessment.result in (
RequirementAssessment.Result.COMPLIANT,
Expand Down

0 comments on commit 18e283d

Please sign in to comment.