From ecdf66bff20740d557212f67adf28f98c714a0bc Mon Sep 17 00:00:00 2001 From: scopesorting Date: Tue, 28 Nov 2023 16:48:20 +0100 Subject: [PATCH] updating check_time_delta_violation_query_time_to_now: no longer ignoring events of the past (delta<=0) --- src/server/BreCal/validators/validation_rule_functions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/BreCal/validators/validation_rule_functions.py b/src/server/BreCal/validators/validation_rule_functions.py index e1c59ff..c8f00c6 100644 --- a/src/server/BreCal/validators/validation_rule_functions.py +++ b/src/server/BreCal/validators/validation_rule_functions.py @@ -99,9 +99,8 @@ class ValidationRuleBaseFunctions(): delta = self.time_logic.time_delta_from_now_to_tgt(tgt_time=query_time, unit="m") # a violation occurs, when the delta (in minutes) exceeds the specified threshold of a participant - # to prevent past-events from triggering violations, negative values are ignored - # Violation, if 0 <= delta <= threshold - violation_state = (delta >= 0) and (delta<=threshold) + # Violation, if delta <= threshold + violation_state = (delta<=threshold) return violation_state def check_participants_agree_on_estimated_time(self, shipcall, query, df_times, applicable_shipcall_type)->bool: