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={
<Link summary_fields?.inventory ? (
to={`/inventories/${ <Link
summary_fields.inventory.kind === 'smart' to={`/inventories/${
? 'smart_inventory' summary_fields?.inventory?.kind === 'smart'
: 'inventory' ? 'smart_inventory'
}/${summary_fields.inventory.id}/details`} : 'inventory'
> }/${summary_fields?.inventory?.id}/details`}
{summary_fields.inventory.name} >
</Link> {summary_fields?.inventory?.name}
</Link>
) : (
' '
)
} }
/> />
)} )}