From 3d4055e465a59114309d23ca1ce069900af9398d Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Mon, 23 Jul 2018 10:11:34 +0100 Subject: [PATCH] Always index the specific version of the book --- wagtail/search/tests/test_backends.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wagtail/search/tests/test_backends.py b/wagtail/search/tests/test_backends.py index b4aec15f3c..11c3da9f9d 100644 --- a/wagtail/search/tests/test_backends.py +++ b/wagtail/search/tests/test_backends.py @@ -421,6 +421,8 @@ class BackendTests(WagtailTestUtils): FANTASY_BOOKS = [1, 2, 3, 4, 5, 6, 7] SCIFI_BOOKS = [10] for book in models.Book.objects.filter(id__in=FANTASY_BOOKS + SCIFI_BOOKS): + book = book.get_indexed_instance() + if book.id in FANTASY_BOOKS: book.tags.add('Fantasy') if book.id in SCIFI_BOOKS: