diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java index e56f931b..94131b5d 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java @@ -1,5 +1,6 @@ package hirs.attestationca.persist.entity.manager; +import hirs.attestationca.persist.entity.userdefined.Device; import hirs.attestationca.persist.entity.userdefined.SupplyChainValidationSummary; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @@ -9,4 +10,5 @@ import java.util.UUID; @Repository public interface SupplyChainValidationSummaryRepository extends JpaRepository { SupplyChainValidationSummary findByDevice(String device); + SupplyChainValidationSummary findByDevice(Device device); } diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java index c01b0075..0040a754 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java @@ -359,7 +359,8 @@ public class SupplyChainValidationService { // Generate validation summary, save it, and return it. List validations = new ArrayList<>(); SupplyChainValidationSummary previous - = this.supplyChainValidationSummaryRepository.findByDevice(deviceName); + //= this.supplyChainValidationSummaryRepository.findByDevice(deviceName); + = this.supplyChainValidationSummaryRepository.findByDevice(device); for (SupplyChainValidation scv : previous.getValidations()) { if (scv.getValidationType() != SupplyChainValidation.ValidationType.FIRMWARE) { validations.add(ValidationService.buildValidationRecord(scv.getValidationType(),