From fd9eb0af3a94d504a7a9cef964287d5e5af3aca1 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 24 Sep 2015 20:08:07 +0100 Subject: [PATCH] Use json rather than simplejson --- haystack_cloudsearch/cloudsearch_backend.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/haystack_cloudsearch/cloudsearch_backend.py b/haystack_cloudsearch/cloudsearch_backend.py index 8b8043b..73a6b5b 100644 --- a/haystack_cloudsearch/cloudsearch_backend.py +++ b/haystack_cloudsearch/cloudsearch_backend.py @@ -4,14 +4,13 @@ from django.core.exceptions import ImproperlyConfigured from django.db.models.loading import get_model -from django.utils import simplejson import haystack from haystack.backends import BaseEngine, BaseSearchBackend, BaseSearchQuery from haystack.exceptions import MissingDependency from haystack.models import SearchResult from haystack.utils import get_identifier - +import json from haystack_cloudsearch.cloudsearch_utils import (ID, DJANGO_CT, DJANGO_ID, gen_version, @@ -93,7 +92,7 @@ def setup(self): ideal_schema = self.build_schema(index.fields) if not should_build_schema: # load the schema as a python data type to compare to the idealized schema - schema = simplejson.loads(simplejson.dumps([d['options'] for d in description])) + schema = json.loads(json.dumps([d['options'] for d in description])) key = lambda x: x[u'index_field_name'] if [x for x in sorted(schema, key=key)] != [x for x in sorted(ideal_schema, key=key)]: self.setup_complete = False