From c125131b9b6354811e771f0767f51aaf51b9712c Mon Sep 17 00:00:00 2001 From: Fabio Anderegg Date: Tue, 15 Nov 2016 16:18:28 +0100 Subject: [PATCH] ckan datastore: convert data error to unicode instead of str to avoid encoding errors --- ckanext/datastore/logic/action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/datastore/logic/action.py b/ckanext/datastore/logic/action.py index f2d44c34ab7..5f670b7183e 100644 --- a/ckanext/datastore/logic/action.py +++ b/ckanext/datastore/logic/action.py @@ -141,7 +141,7 @@ def datastore_create(context, data_dict): try: result = db.create(context, data_dict) except db.InvalidDataError as err: - raise p.toolkit.ValidationError(str(err)) + raise p.toolkit.ValidationError(unicode(err)) # Set the datastore_active flag on the resource if necessary if resource.extras.get('datastore_active') is not True: