Skip to content

Commit

Permalink
set Timestamp.NEVER to negative value (Fixes rndusr#245)
Browse files Browse the repository at this point in the history
this way Timestamp.NEVER will sort as less than other timestamps
  • Loading branch information
rsekman committed Apr 4, 2024
1 parent 16993ab commit 0686d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stig/client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class Timestamp(float):
SOON = -1 + 0.123456789
UNKNOWN = 1e10 + 0.123456789
NOT_APPLICABLE = 1e11 + 0.123456789
NEVER = 1e12 + 0.123456789
NEVER = -1e12 + 0.123456789
CONSTANTS = (NOW, SOON, UNKNOWN, NOT_APPLICABLE, NEVER)
_CONSTANTS_MAP_STRINGS = {'now': NOW, 'soon': SOON, 'unknown': UNKNOWN,
'na': NOT_APPLICABLE, 'n/a': NOT_APPLICABLE, 'not applicable': NOT_APPLICABLE,
Expand Down

0 comments on commit 0686d3c

Please sign in to comment.