From: Marcin Koziej Date: Thu, 2 Feb 2012 09:39:09 +0000 (+0100) Subject: Query fragments also by book id. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/d122aec6b58ba1aca896e0d2edff1b2562f82352 Query fragments also by book id. --- 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