From df234719993ec0d15ba5379dd09cfa187756dada Mon Sep 17 00:00:00 2001 From: amercader Date: Mon, 16 Sep 2024 12:32:42 +0200 Subject: [PATCH] Don't fail if ckanext-scheming is not installed --- ckanext/dcat/validators.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ckanext/dcat/validators.py b/ckanext/dcat/validators.py index 9bf18d49..6fc741a5 100644 --- a/ckanext/dcat/validators.py +++ b/ckanext/dcat/validators.py @@ -9,7 +9,13 @@ Invalid, _, ) -from ckanext.scheming.validation import scheming_validator + +try: + from ckanext.scheming.validation import scheming_validator +except ImportError: + def scheming_validator(func): + return func + # https://www.w3.org/TR/xmlschema11-2/#gYear regexp_xsd_year = re.compile(