Attestation bug fix - filter instances if no associated run
#CTCTOWALTZ-1469
@@ -35,10 +35,12 @@ const bindings = {
function mkAttestationData(attestationRuns = [], attestationInstances = []){
const runsById = _.keyBy(attestationRuns, "id");
- return _.map(attestationInstances, instance => ({
+ const runsAndInstances = _.map(attestationInstances, instance => ({
"instance": instance,
"run": runsById[instance.attestationRunId]
}));
+
+ return _.filter(runsAndInstances, attestation => !_.isEmpty(attestation.run));
}
