mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
fix inventory saving without insights credential specified
This commit is contained in:
parent
d0c891764f
commit
f3c5cb5a2e
@ -16,7 +16,7 @@ import ErrorDetail from '@components/ErrorDetail';
|
||||
|
||||
const EmptyState = styled(PFEmptyState)`
|
||||
width: var(--pf-c-empty-state--m-lg--MaxWidth);
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
`;
|
||||
|
||||
async function logout() {
|
||||
|
||||
@ -54,7 +54,9 @@ function InventoryAdd({ history, i18n }) {
|
||||
data: { id: inventoryId },
|
||||
} = await InventoriesAPI.create({
|
||||
organization: organization.id,
|
||||
insights_credential: insights_credential.id,
|
||||
insights_credential: insights_credential
|
||||
? insights_credential.id
|
||||
: null,
|
||||
...remainingValues,
|
||||
});
|
||||
if (instanceGroups) {
|
||||
@ -74,7 +76,15 @@ function InventoryAdd({ history, i18n }) {
|
||||
};
|
||||
|
||||
if (error) {
|
||||
return <ContentError />;
|
||||
return (
|
||||
<PageSection>
|
||||
<Card>
|
||||
<CardBody>
|
||||
<ContentError error={error} />
|
||||
</CardBody>
|
||||
</Card>
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
if (isLoading) {
|
||||
return <ContentLoading />;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user