Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions haystack_cloudsearch/cloudsearch_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down