Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make collection id required #1036

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function WorkflowParameterAddPanel({ type, onClose, onSave }: Props) {
} catch (e) {
toast({
variant: "destructive",
title: "Failed to save parameters",
title: "Failed to add parameter",
description: "Invalid JSON for default value",
});
return;
Expand All @@ -227,6 +227,14 @@ function WorkflowParameterAddPanel({ type, onClose, onSave }: Props) {
});
}
if (type === "credential") {
if (!collectionId) {
toast({
variant: "destructive",
title: "Failed to add parameter",
description: "Collection ID is required",
});
return;
}
onSave({
key,
parameterType: "credential",
Expand All @@ -239,7 +247,7 @@ function WorkflowParameterAddPanel({ type, onClose, onSave }: Props) {
if (!sourceParameterKey) {
toast({
variant: "destructive",
title: "Failed to save parameters",
title: "Failed to add parameter",
description: "Source parameter key is required",
});
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function WorkflowParameterEditPanel({
} catch (e) {
toast({
variant: "destructive",
title: "Failed to save parameters",
title: "Failed to save parameter",
description: "Invalid JSON for default value",
});
return;
Expand All @@ -260,6 +260,14 @@ function WorkflowParameterEditPanel({
});
}
if (type === "credential") {
if (!collectionId) {
toast({
variant: "destructive",
title: "Failed to save parameter",
description: "Collection ID is required",
});
return;
}
onSave({
key,
parameterType: "credential",
Expand All @@ -272,7 +280,7 @@ function WorkflowParameterEditPanel({
if (!sourceParameterKey) {
toast({
variant: "destructive",
title: "Failed to save parameters",
title: "Failed to save parameter",
description: "Source parameter key is required",
});
return;
Expand Down
Loading