Skip to content

Commit

Permalink
null check for clientRefId in validator
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhang-eGov committed Feb 19, 2025
1 parent d48ee98 commit ba86104
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ReflectionUtils;

import java.lang.reflect.Method;
Expand Down Expand Up @@ -70,7 +71,7 @@ public Map<Individual, List<Error>> validate(IndividualBulkRequest request) {
// Create a search object for querying existing entities
IndividualSearch individualSearch = IndividualSearch.builder()
.id(idList)
.clientReferenceId(clientReferenceIdList)
.clientReferenceId(CollectionUtils.isEmpty(clientReferenceIdList) ? null : clientReferenceIdList)
.build();

List<Individual> existingIndividuals;
Expand Down

0 comments on commit ba86104

Please sign in to comment.