From 2f67e58acead8bede31e9fd5b00fef54c0366e50 Mon Sep 17 00:00:00 2001 From: scopesorting Date: Tue, 12 Dec 2023 13:20:31 +0100 Subject: [PATCH] created a feature flag, which disables the PORT_ADMINISTRATION validation rules. Currently, the flag is 'hardcoded' once in the library. Adapting the test to properly facilitate the feature flag cherry picking all open adjustments to the develop branch. --- src/server/BreCal/validators/validation_rule_functions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/BreCal/validators/validation_rule_functions.py b/src/server/BreCal/validators/validation_rule_functions.py index 11c2106..ed58b51 100644 --- a/src/server/BreCal/validators/validation_rule_functions.py +++ b/src/server/BreCal/validators/validation_rule_functions.py @@ -383,6 +383,9 @@ class ValidationRuleFunctions(ValidationRuleBaseFunctions): - Checks, if times_port_administration.etd_berth is filled in. - Measures the difference between 'now' and 'times_agency.etd_berth'. """ + if self.ignore_port_administration_flag: + return self.get_no_violation_default_output() + if not shipcall.type in [ShipcallType.OUTGOING.value, ShipcallType.SHIFTING.value]: return self.get_no_violation_default_output()