diff --git a/apps/hpc-ftsadmin/src/app/utils/parse-flow-form.ts b/apps/hpc-ftsadmin/src/app/utils/parse-flow-form.ts index e512f001a..d1312671d 100644 --- a/apps/hpc-ftsadmin/src/app/utils/parse-flow-form.ts +++ b/apps/hpc-ftsadmin/src/app/utils/parse-flow-form.ts @@ -387,7 +387,7 @@ const isInferred = ( } const inferredList = flow.externalReferences.map((eR) => { - if (!eR.importInformation.inferred) { + if (!eR.importInformation?.inferred) { return false; } return eR.importInformation.inferred.some( @@ -411,7 +411,7 @@ const isTransferred = ( } const transferredList = flow.externalReferences.map((eR) => { - if (!eR.importInformation.transferred) { + if (!eR.importInformation?.transferred) { return false; } return eR.importInformation.transferred.some( diff --git a/libs/hpc-data/src/lib/flows.ts b/libs/hpc-data/src/lib/flows.ts index f4cc0bf48..239318fcc 100644 --- a/libs/hpc-data/src/lib/flows.ts +++ b/libs/hpc-data/src/lib/flows.ts @@ -224,10 +224,13 @@ const FLOW_REST_EXTERNAL_REFERENCE = t.type({ versionID: t.number, createdAt: t.string, updatedAt: t.string, - importInformation: t.partial({ - inferred: t.array(FLOW_IMPORT_INFORMATION), - transferred: t.array(FLOW_IMPORT_INFORMATION), - }), + importInformation: t.union([ + t.partial({ + inferred: t.array(FLOW_IMPORT_INFORMATION), + transferred: t.array(FLOW_IMPORT_INFORMATION), + }), + t.null, + ]), }); const FLOW_REST_EXTERNAL_DATA = t.type({