diff --git a/wagtail/contrib/postgres_search/backend.py b/wagtail/contrib/postgres_search/backend.py index d41b6b0eb..e66eea1a2 100644 --- a/wagtail/contrib/postgres_search/backend.py +++ b/wagtail/contrib/postgres_search/backend.py @@ -249,8 +249,8 @@ class PostgresSearchQueryCompiler(BaseSearchQueryCompiler): return queryset[start:stop] def _process_lookup(self, field, lookup, value): - return Q(**{field.get_attname(self.queryset.model) - + '__' + lookup: value}) + return Q(**{field.get_attname(self.queryset.model) + + '__' + lookup: value}) def _connect_filters(self, filters, connector, negated): if connector == 'AND': diff --git a/wagtail/contrib/postgres_search/tests/test_backend.py b/wagtail/contrib/postgres_search/tests/test_backend.py index dbeead789..96ceea996 100644 --- a/wagtail/contrib/postgres_search/tests/test_backend.py +++ b/wagtail/contrib/postgres_search/tests/test_backend.py @@ -1,6 +1,3 @@ -# coding: utf-8 -import unittest - from django.test import TestCase from wagtail.search.tests.test_backends import QueryAPITestMixin, BackendTests