Merge pull request #8722 from jakemcdermott/fix-8695

Handle prompted inventory without value on schedules

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-12-04 14:33:58 +00:00 committed by GitHub
commit 4cc947d65d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,15 +201,19 @@ function ScheduleDetail({ schedule, i18n }) {
<Detail
label={i18n._(t`Inventory`)}
value={
<Link
to={`/inventories/${
summary_fields.inventory.kind === 'smart'
? 'smart_inventory'
: 'inventory'
}/${summary_fields.inventory.id}/details`}
>
{summary_fields.inventory.name}
</Link>
summary_fields?.inventory ? (
<Link
to={`/inventories/${
summary_fields?.inventory?.kind === 'smart'
? 'smart_inventory'
: 'inventory'
}/${summary_fields?.inventory?.id}/details`}
>
{summary_fields?.inventory?.name}
</Link>
) : (
' '
)
}
/>
)}