77817: Add subject null check

This commit is contained in:
Yura Bondarenko
2021-03-31 10:49:01 +02:00
parent 9b748790c8
commit e23f2980e0

View File

@@ -160,7 +160,8 @@ public class IndexEventConsumer implements Consumer {
// If the event subject is a Collection and the event object is an Item, // If the event subject is a Collection and the event object is an Item,
// also update the object in order to index mapped/unmapped Items // also update the object in order to index mapped/unmapped Items
if (subject.getType() == Constants.COLLECTION && object.getType() == Constants.ITEM) { if (subject != null &&
subject.getType() == Constants.COLLECTION && object.getType() == Constants.ITEM) {
objectsToUpdate.addAll(indexObjectServiceFactory.getIndexableObjects(ctx, object)); objectsToUpdate.addAll(indexObjectServiceFactory.getIndexableObjects(ctx, object));
} }
} }