This commit is contained in:
Efstratios Giannopoulos 2024-05-16 10:39:08 +03:00
parent c7661e8a2c
commit 9bc6a2e8d1
1 changed files with 1 additions and 1 deletions

View File

@ -421,7 +421,7 @@ public class PrefillingSourceServiceImpl implements PrefillingSourceService {
if (!this.conventionService.isListNullOrEmpty(issuedFieldEntities)) { if (!this.conventionService.isListNullOrEmpty(issuedFieldEntities)) {
String issuedIdNode = issuedFieldEntities.getFirst().getId(); String issuedIdNode = issuedFieldEntities.getFirst().getId();
String issuedValue = this.conventionService.isNullOrEmpty(issuedIdNode) ? null : description.getProperties().getFieldSets().values().stream().map(PropertyDefinitionFieldSet::getItems).flatMap(List::stream) String issuedValue = this.conventionService.isNullOrEmpty(issuedIdNode) ? null : description.getProperties().getFieldSets().values().stream().map(PropertyDefinitionFieldSet::getItems).flatMap(List::stream)
.filter(x -> x.getFields() != null && x.getFields().containsKey(issuedIdNode)).map(x -> x.getFields().get(issuedIdNode).getTextValue()).findFirst().orElse(null); .filter(x -> x.getFields() != null && x.getFields().containsKey(issuedIdNode)).map(x -> x.getFields().get(issuedIdNode).getTextValue()).filter(Objects::nonNull).findFirst().orElse(null);
if (!this.conventionService.isNullOrEmpty(issuedValue)) { if (!this.conventionService.isNullOrEmpty(issuedValue)) {
List<FieldSetEntity> licStartFieldSetsEntities = definition.getAllFieldSets().stream().filter(x -> x.getAllField() != null && x.getAllField().stream().anyMatch(y -> y.getSchematics() != null && y.getSchematics().contains("rda.dataset.distribution.license.start_date"))).toList(); List<FieldSetEntity> licStartFieldSetsEntities = definition.getAllFieldSets().stream().filter(x -> x.getAllField() != null && x.getAllField().stream().anyMatch(y -> y.getSchematics() != null && y.getSchematics().contains("rda.dataset.distribution.license.start_date"))).toList();