Skip to content

Commit

Permalink
Fix Severity comparison logic
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPelletier committed Oct 31, 2023
1 parent 6cf64ca commit e96227d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions monitoring/uss_qualifier/common_data_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def __gt__(self, other):
raise ValueError(f"Cannot compare Severity to {type(other)}")

if self == Severity.Critical:
return False
return other != Severity.Critical
elif self == Severity.High:
return other == Severity.Critical
return other == Severity.Medium or other == Severity.Low
elif self == Severity.Medium:
return other == Severity.Low
elif self == Severity.Low:
return True
return False
else:
raise ValueError(f"Unknown Severity type: '{self}'")

Expand Down

0 comments on commit e96227d

Please sign in to comment.