fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic fragment choosing
[wolnelektury.git]
/
apps
/
search
/
index.py
diff --git
a/apps/search/index.py
b/apps/search/index.py
index
df44888
..
9972c2c
100644
(file)
--- a/
apps/search/index.py
+++ b/
apps/search/index.py
@@
-653,7
+653,11
@@
class SearchResult(object):
hits = sections.values()
for f in frags:
hits = sections.values()
for f in frags:
- frag = catalogue.models.Fragment.objects.get(anchor=f[FRAGMENT])
+ try:
+ frag = catalogue.models.Fragment.objects.get(anchor=f[FRAGMENT])
+ except catalogue.models.Fragment.DoesNotExist:
+ # stale index
+ continue
# Figure out if we were searching for a token matching some word in theme name.
themes = frag.tags.filter(category='theme')
# Figure out if we were searching for a token matching some word in theme name.
themes = frag.tags.filter(category='theme')