Accession save deleting relations triggering indexing of related descriptions
|Assignee:||Dan Gillean||% Done:|
|Target version:||Release 2.5.0|
|Google Code Legacy ID:||Tested version:||2.5|
Any modification to an Accession in the WebUI is triggering related information object records to be re-indexed in ES - the submit logic deletes all the relations and re-creates them on every save regardless of the change and QubitRelation contains code to reindex IOs when the relation is deleted. The bug is here:
These should be comparing the relation "subjectId" and not "objectId" (objectId contains the accession.id, subjectId contains the info_obj.id) - this comparison will always fail as-is, and so causes the relations to be deleted and re-added every time someone saves a change regardless of which field is updated. This means unnecessarily re-indexing a large number of information objects, terms etc.