--
This commit is contained in:
@@ -47,7 +47,7 @@ class Finding:
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
d = asdict(self)
|
||||
d["severity_label"] = SEVERITY_LABELS.get(self.severity, self.severity)
|
||||
d["color"] = SEVERITY_COLORS.get(self.severity, "tx")
|
||||
d["color"] = SEVERITY_COLORS.get(self.severity, "light-grey")
|
||||
# impact is what the UI sorts by for the Summary tab.
|
||||
mul = {"good": 0.0, "normal": 0.0, "notgood": 1.0, "bad": 3.0, "serious": 9.0, "info": 0.0}.get(self.severity, 0.0)
|
||||
d["impact"] = mul * float(self.weight)
|
||||
|
||||
Reference in New Issue
Block a user