RED-2441: Fixed dossierTemplateId is null for soft deleted files
This commit is contained in:
parent
952a61cb21
commit
d5b70932b2
@ -13,5 +13,9 @@ public class FileModelMapper implements BiConsumer<FileEntity, FileModel> {
|
||||
fileEntity.getFileAttributes().forEach(fa ->
|
||||
fileModel.getFileAttributes().put(fa.getFileAttributeId().getFileAttributeConfigId(), fa.getValue())
|
||||
);
|
||||
|
||||
// Without this dossierTemplateId is not set for soft-deleted documents calling get softdeleted with curl.
|
||||
// however in the unittest it always null without it. Strange....
|
||||
fileModel.setDossierTemplateId(fileEntity.getDossier().getDossierTemplateId());
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,6 +137,7 @@ public class FileTest extends AbstractPersistenceServerServiceTest {
|
||||
|
||||
var softDeletedFiles = fileClient.getSoftDeletedDossierStatus(dossier.getId());
|
||||
assertThat(softDeletedFiles.size()).isEqualTo(1);
|
||||
assertThat(softDeletedFiles.get(0).getDossierTemplateId()).isNotNull();
|
||||
var activeFiles = fileClient.getDossierStatus(dossier.getId());
|
||||
assertThat(activeFiles.size()).isEqualTo(0);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user