diff options
| author | Павел Жуков <33721692+LeaveMyYard@users.noreply.github.com> | 2023-05-29 17:44:06 +0300 |
|---|---|---|
| committer | Павел Жуков <33721692+LeaveMyYard@users.noreply.github.com> | 2023-05-29 17:44:06 +0300 |
| commit | ab63e6e7d1722ee581cc2c6e7f9ae14cd8a26c10 (patch) | |
| tree | f8dd1e20012859564676927ec3f7a828e68af58b | |
| parent | 7b926b83f3c2053a80fc3d84f2c363c22096285b (diff) | |
Fix exception when no scans are collected
| -rw-r--r-- | robusta_krr/core/models/result.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/robusta_krr/core/models/result.py b/robusta_krr/core/models/result.py index a72ff21..b839f46 100644 --- a/robusta_krr/core/models/result.py +++ b/robusta_krr/core/models/result.py @@ -100,7 +100,7 @@ class Result(pd.BaseModel): """ 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: |
