Skip to content

Commit

Permalink
fix: minor fix in insert into index step
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Oct 4, 2023
1 parent bbc4971 commit d0390aa
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ private int doExecute(
Iterator iterator = OMultiValue.getMultiValueIterator(value);
while (iterator.hasNext()) {
Object item = iterator.next();
if (value instanceof OIdentifiable) {
insertIntoIndex(index, key, (OIdentifiable) value);
if (item instanceof OIdentifiable) {
insertIntoIndex(index, key, (OIdentifiable) item);
count++;
} else if (value instanceof OResult && ((OResult) value).isElement()) {
insertIntoIndex(index, key, ((OResult) value).getElement().get());
} else if (item instanceof OResult && ((OResult) item).isElement()) {
insertIntoIndex(index, key, ((OResult) item).getElement().get());
count++;
} else {
throw new OCommandExecutionException("Cannot insert into index " + value);
throw new OCommandExecutionException("Cannot insert into index " + item);
}
}
}
Expand Down

0 comments on commit d0390aa

Please sign in to comment.