Skip to content

Commit

Permalink
fix: Importer type - new vs edit (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
gildub authored Jul 17, 2024
1 parent 0e68e12 commit fea4158
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type FormValues = {
export const myImporters = ["sbom", "csaf", "osv", "cve", ""] as const;

export interface IImporterFormProps {
importer?: Importer;
importer: Importer | null;
onClose: () => void;
}

Expand Down Expand Up @@ -143,7 +143,7 @@ export const ImporterForm: React.FC<IImporterFormProps> = ({
defaultValues: {
name: importer?.name || "",
description: importerConfiguration?.description || "",
type: "",
type: importer ? importerType : "",
source: importerConfiguration?.source || "",
periodValue: periodValue || 60,
periodUnit: periodUnit || "s",
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/pages/importer-list/importer-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export const ImporterList: React.FC = () => {
onClose={closeCreateUpdateModal}
>
<ImporterForm
importer={entityToUpdate ? entityToUpdate : undefined}
importer={entityToUpdate}
onClose={closeCreateUpdateModal}
/>
</Modal>
Expand Down

0 comments on commit fea4158

Please sign in to comment.