search static reference fix

This commit is contained in:
amentis 2024-04-09 17:21:00 +03:00
parent 9bd50f379f
commit c27ba6ee6a
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import com.jayway.jsonpath.JsonPath;
import com.jayway.jsonpath.PathNotFoundException;
import eu.eudat.commons.JsonHandlingService;
import eu.eudat.commons.enums.ExternalFetcherSourceType;
import eu.eudat.commons.types.externalfetcher.StaticOptionEntity;
import eu.eudat.convention.ConventionService;
import eu.eudat.data.ReferenceEntity;
import eu.eudat.model.Reference;
@ -115,7 +116,7 @@ public class ExternalFetcherServiceImpl implements ExternalFetcherService {
Map<String, String> result = new HashMap<>();
Map<String, Object> rawData = new HashMap<>();
for (Object object: item.getOptions()) {
eu.eudat.model.externalfetcher.StaticOption staticOption = (eu.eudat.model.externalfetcher.StaticOption) object;
StaticOptionEntity staticOption = (StaticOptionEntity) object;
if (!this.conventionService.isNullOrEmpty(externalReferenceCriteria.getLike()) && !externalReferenceCriteria.getLike().toUpperCase().contains(staticOption.getValue())) continue;
result.put(staticOption.getCode(), staticOption.getValue());
rawData.put(staticOption.getCode(), staticOption.getValue());