Cannot get primary key value: entity is null

Lately I’m seeing in the tomcat log that the following error is generated

09:25:37.096 ERROR o.s.t.s.TransactionSynchronizationUtils - TransactionSynchronization.afterCompletion threw exception
java.lang.IllegalStateException: Cannot get primary key value: entity is null
        at com.haulmont.cuba.core.entity.IdProxy.getNN(IdProxy.java:135) ~[cuba-global-6.9.0.jar:6.9.0]
        at com.haulmont.cuba.core.entity.FtsQueue.setObjectEntityId(FtsQueue.java:143) ~[cuba-global-6.9.0.jar:6.9.0]
        at com.haulmont.fts.core.app.FtsSenderBean.persistQueueItem(FtsSenderBean.java:128) ~[fts-core-6.9.0.jar:6.9.0]
        at com.haulmont.fts.core.app.FtsSenderBean.enqueue(FtsSenderBean.java:106) ~[fts-core-6.9.0.jar:6.9.0]
        at com.haulmont.fts.core.app.FtsSenderBean.lambda$enqueue$0(FtsSenderBean.java:85) ~[fts-core-6.9.0.jar:6.9.0]
        at com.haulmont.cuba.core.sys.PersistenceImpl$EntityManagerContextSynchronization.afterCompletion(PersistenceImpl.java:329) ~[cuba-core-6.9.0.jar:6.9.0]

The only thing I notice is that you have a service that makes a notification by email, the notification is done without problem but always generates the error.

Is it something that has to do with my code?

@Override
protected boolean postCommit(boolean committed, boolean close) {
    if (committed && wasNew) {
        proyectoService.actualizarPaqueteProyectoTarea(getItem());
        notificarPorCorreoService.notificarResponsableTareaProyecto(getItem());
    }
    return super.postCommit(committed, close);
}

Hi,

The problem is fixed in the platform version 6.9.1. Issue: FTS does not work for identity entities · Issue #27 · cuba-platform/fts · GitHub