diff --git a/robusta_krr/core/models/result.py b/robusta_krr/core/models/result.py index a72ff21a..b839f46c 100644 --- a/robusta_krr/core/models/result.py +++ b/robusta_krr/core/models/result.py @@ -100,7 +100,7 @@ def __calculate_score(self) -> int: """ score = sum(self.__scan_cost(scan) for scan in self.scans) - return int((len(self.scans) - score) / len(self.scans) * 100) + return int((len(self.scans) - score) / len(self.scans) * 100) if self.scans else 0 @property def score_letter(self) -> str: