You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2026. It is now read-only.
When using prefetch and we hit a model object that has been deleted already,
one get a key error in Djapian. Such a non-existent model object is found, in
case of an outdated xapian index.
In our case, we call index --rebuild once a day. In between, objects are
deleted by users. To prevent the subsequent key error in serach results, please
change the following in ** resultset.py**
resultset.py, line 150+
for hit in hits:
try: hit.instance = instances[hit.pk]
except: self._resultset_cache.remove(hit)
Instead of attaching instances[hit.pk] to hit.instance (which throws the actual
error), we simply remove this hit from the resultset :)
Cheers,
Simon
Original issue reported on code.google.com by i...@pagewizz.com on 12 Nov 2010 at 6:26
Original issue reported on code.google.com by
i...@pagewizz.comon 12 Nov 2010 at 6:26