daevaorn / djapian

High level Xapian integration for Django
Other
6 stars 3 forks source link

manage.py index fails on deletion of a model with multiple indexers #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When a model has multiple indexers defined on it, and an object of that model 
is deleted, running 'manage.py index' fails with an underlying exception of 
"AssertionError: Change object can't be deleted because its id attribute is set 
to None."

This is because the change.delete() line is wrongly placed inside the 'for 
indexer in indexers' loop, meaning that it attempts to delete the change once 
per indexer.

Patch (with unit test) attached.

Original issue reported on code.google.com by westdotc...@gmail.com on 31 Jul 2011 at 5:19

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r382

Original comment by esizi...@gmail.com on 21 Oct 2011 at 11:32