Merge pull request #469 from nsacyber/issue-468

[#468] Platform Manufacturer causes 500 error
This commit is contained in:
Cyrus 2022-04-12 09:52:32 -04:00 committed by GitHub
commit 5088bf7107
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,17 +225,8 @@ public class ReferenceManifestPageController
}); });
supportRims.stream().forEach((rim) -> { supportRims.stream().forEach((rim) -> {
LOGGER.info(String.format("Storing event log %s", rim.getFileName())); LOGGER.info(String.format("Storing event log %s", rim.getFileName()));
storeManifest(messages, rim, false);
});
for (ReferenceManifest rim : baseRims) {
// store first then update
storeManifest(messages, rim, false);
}
for (ReferenceManifest rim : supportRims) {
// store the rimels
storeManifest(messages, rim, true); storeManifest(messages, rim, true);
} });
// Prep a map to associated the swidtag payload hash to the swidtag. // Prep a map to associated the swidtag payload hash to the swidtag.
// pass it in to update support rims that either were uploaded // pass it in to update support rims that either were uploaded
@ -657,6 +648,7 @@ public class ReferenceManifestPageController
// So first we'll have to pull values based on support rim // So first we'll have to pull values based on support rim
// get by support rim id NEXT // get by support rim id NEXT
if (dbSupport.getPlatformManufacturer() != null) {
tpmEvents = referenceEventManager.getValuesByRimId(dbSupport); tpmEvents = referenceEventManager.getValuesByRimId(dbSupport);
baseRim = findBaseRim(dbSupport); baseRim = findBaseRim(dbSupport);
if (tpmEvents.isEmpty()) { if (tpmEvents.isEmpty()) {
@ -689,4 +681,5 @@ public class ReferenceManifestPageController
} }
} }
} }
}
} }