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

View File

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