From e59a295431247fcd605fe55bb4fd9a2ecfc28d2b Mon Sep 17 00:00:00 2001 From: amercader Date: Fri, 1 Sep 2023 13:52:05 +0200 Subject: [PATCH] Don't use bultin functions as validators on harvesters --- ckanext/spatial/harvesters/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ckanext/spatial/harvesters/base.py b/ckanext/spatial/harvesters/base.py index 947defc4..518c7177 100644 --- a/ckanext/spatial/harvesters/base.py +++ b/ckanext/spatial/harvesters/base.py @@ -33,7 +33,7 @@ from ckanext.spatial.validation import Validators, all_validators from ckanext.spatial.harvested_metadata import ISODocument from ckanext.spatial.interfaces import ISpatialHarvester -from ckantoolkit import config +from ckantoolkit import config, unicode_safe log = logging.getLogger(__name__) @@ -646,7 +646,7 @@ def import_stage(self, harvest_object): # The default package schema does not like Upper case tags tag_schema = logic.schema.default_tags_schema() - tag_schema['name'] = [not_empty, six.text_type] + tag_schema['name'] = [not_empty, unicode_safe] # Flag this object as the current one harvest_object.current = True @@ -660,7 +660,7 @@ def import_stage(self, harvest_object): # We need to explicitly provide a package ID, otherwise ckanext-spatial # won't be be able to link the extent to the package. package_dict['id'] = six.text_type(uuid.uuid4()) - package_schema['id'] = [six.text_type] + package_schema['id'] = [unicode_safe] # Save reference to the package on the object harvest_object.package_id = package_dict['id']