Misleading exception when referencing a list of unmergeable entities
Summary
I have the following configuration which produces exceptions which should not happen in this way:
- RecordType
A
referencesLIST<B>
- The Identifiable of
B
consists ofis_referenced_by: A
, and some properties ofB
. - There is data for one
A
record and twoB
records.- The two
B
records have equal registered identifiables, but they cannot be merged due to other reference properties which are different.
- The two
This leads to an exception in
# line 803 in crawl.py
identifiable = self.identifiableAdapter.get_identifiable(
record,
referencing_entities=referencing_entities[id(record)])
because referencing_entities does not contain
id(record)of the first
B` record (any more?). Therefore, the exception complains about a missing referencing entity:
NotImplementedError('Could not find referencing entities...
Expected Behavior
There should be an exception about the merge conflict, not about missing referencing entities.
Actual Behavior
This error
Steps to Reproduce the Problem
I will write a short test for this
Specifications
- Version: Current dev branch, plus some unrelated minor changes.
- Platform: Which operating system, which other relevant software versions?
Possible fixes
Do you have ideas how the issue can be resolved?
Edited by Quazgar