An example of when this error is thrown can be seen in the test that I have added.
What is happening here is that the range_length is 7, end is 7, and len(document_reference) is 14. That means that end + range_length == len(document_references). That means that the elif statement does not fire and it goes to else, which errors because it tries to call document_references[end + range_length], which would be document_references[14], which doesn't exist. This change should correct the problem.
Coverage remained the same at 94.116% when pulling a70eb963420918bf80c6ead03ababbb421a6bc9d on correction_siblingsId into 3ff0f27e514f5895d4f83dbe294d4035a9e4dc53 on dev.
An example of when this error is thrown can be seen in the test that I have added. What is happening here is that the
range_length
is 7,end
is 7, andlen(document_reference)
is 14. That means thatend + range_length == len(document_references)
. That means that theelif
statement does not fire and it goes toelse
, which errors because it tries to calldocument_references[end + range_length]
, which would bedocument_references[14]
, which doesn't exist. This change should correct the problem.