From 91ad379c0d0b8cacdc337e50db4cb4ef6aaf7757 Mon Sep 17 00:00:00 2001 From: tobes Date: Wed, 9 Jan 2013 12:30:50 +0000 Subject: [PATCH] [#262] Fix helper import in version 029 --- ckan/migration/versions/029_version_groups.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ckan/migration/versions/029_version_groups.py b/ckan/migration/versions/029_version_groups.py index e279f07841a..a3fac69cc9e 100644 --- a/ckan/migration/versions/029_version_groups.py +++ b/ckan/migration/versions/029_version_groups.py @@ -8,7 +8,7 @@ -from ckan.lib.helpers import json +import ckan.lib.helpers as h class JsonType(types.TypeDecorator): '''Store data as JSON serializing on save and unserializing on use. ''' @@ -19,13 +19,13 @@ def process_bind_param(self, value, engine): return None else: # ensure_ascii=False => allow unicode but still need to convert - return unicode(json.dumps(value, ensure_ascii=False)) + return unicode(h.json.dumps(value, ensure_ascii=False)) def process_result_value(self, value, engine): if value is None: return None else: - return json.loads(value) + return h.json.loads(value) def copy(self): return JsonType(self.impl.length)