Skip to content

Commit

Permalink
Don't use bultin functions as validators on harvesters
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Sep 1, 2023
1 parent 8471e63 commit e59a295
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckanext/spatial/harvesters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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
Expand All @@ -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']
Expand Down

0 comments on commit e59a295

Please sign in to comment.