Test repository change

This commit is contained in:
iadgovuser29 2024-06-13 09:26:39 -04:00 committed by chubtub
parent 9fdc8b1bcb
commit 951224abd0
2 changed files with 4 additions and 1 deletions

View File

@ -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, UUID> {
SupplyChainValidationSummary findByDevice(String device);
SupplyChainValidationSummary findByDevice(Device device);
}

View File

@ -359,7 +359,8 @@ public class SupplyChainValidationService {
// Generate validation summary, save it, and return it.
List<SupplyChainValidation> 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(),