From d122aec6b58ba1aca896e0d2edff1b2562f82352 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Thu, 2 Feb 2012 10:39:09 +0100 Subject: [PATCH] Query fragments also by book id. --- apps/search/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/search/index.py b/apps/search/index.py index 8ea31240e..b4ecc9609 100644 --- a/apps/search/index.py +++ b/apps/search/index.py @@ -732,7 +732,7 @@ class SearchResult(object): for f in frags: try: - frag = catalogue.models.Fragment.objects.get(anchor=f[FRAGMENT]) + frag = catalogue.models.Fragment.objects.get(anchor=f[FRAGMENT], book__id=self.book_id) except catalogue.models.Fragment.DoesNotExist: # stale index continue -- 2.20.1