From 3e88a69b01b14ea3275e36e3db500244f5466cd7 Mon Sep 17 00:00:00 2001 From: "Ed (ODSC)" Date: Tue, 3 Dec 2024 08:29:57 +0000 Subject: [PATCH] checks.py: Restrict legagcy checks to < 0.4 --- libcovebods/tasks/checks.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libcovebods/tasks/checks.py b/libcovebods/tasks/checks.py index ef41530..2534311 100644 --- a/libcovebods/tasks/checks.py +++ b/libcovebods/tasks/checks.py @@ -20,6 +20,10 @@ class LegacyChecks(AdditionalCheck): This now only has legacy checks that don't need to store a history. Ones that need to store history are in LegacyChecksNeedingHistory.""" + @staticmethod + def does_apply_to_schema(lib_cove_bods_config, schema_object) -> bool: + return schema_object.is_schema_version_less_than("0.4") + @staticmethod def get_additional_check_types_possible( lib_cove_bods_config, schema_object @@ -254,6 +258,10 @@ class LegacyChecksNeedingHistory(AdditionalCheck): This now only has legacy checks that need to store a history. Ones that don't need to store history are in LegacyChecks.""" + @staticmethod + def does_apply_to_schema(lib_cove_bods_config, schema_object) -> bool: + return schema_object.is_schema_version_less_than("0.4") + @staticmethod def get_additional_check_types_possible( lib_cove_bods_config, schema_object