Skip to content

Commit

Permalink
checks.py: Restrict legagcy checks to < 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Dec 3, 2024
1 parent bc8ebdf commit 3e88a69
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libcovebods/tasks/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3e88a69

Please sign in to comment.