Make collection id required (#1036)
This commit is contained in:
@@ -205,7 +205,7 @@ function WorkflowParameterAddPanel({ type, onClose, onSave }: Props) {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Failed to save parameters",
|
title: "Failed to add parameter",
|
||||||
description: "Invalid JSON for default value",
|
description: "Invalid JSON for default value",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -227,6 +227,14 @@ function WorkflowParameterAddPanel({ type, onClose, onSave }: Props) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (type === "credential") {
|
if (type === "credential") {
|
||||||
|
if (!collectionId) {
|
||||||
|
toast({
|
||||||
|
variant: "destructive",
|
||||||
|
title: "Failed to add parameter",
|
||||||
|
description: "Collection ID is required",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
onSave({
|
onSave({
|
||||||
key,
|
key,
|
||||||
parameterType: "credential",
|
parameterType: "credential",
|
||||||
@@ -239,7 +247,7 @@ function WorkflowParameterAddPanel({ type, onClose, onSave }: Props) {
|
|||||||
if (!sourceParameterKey) {
|
if (!sourceParameterKey) {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Failed to save parameters",
|
title: "Failed to add parameter",
|
||||||
description: "Source parameter key is required",
|
description: "Source parameter key is required",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ function WorkflowParameterEditPanel({
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Failed to save parameters",
|
title: "Failed to save parameter",
|
||||||
description: "Invalid JSON for default value",
|
description: "Invalid JSON for default value",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -260,6 +260,14 @@ function WorkflowParameterEditPanel({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (type === "credential") {
|
if (type === "credential") {
|
||||||
|
if (!collectionId) {
|
||||||
|
toast({
|
||||||
|
variant: "destructive",
|
||||||
|
title: "Failed to save parameter",
|
||||||
|
description: "Collection ID is required",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
onSave({
|
onSave({
|
||||||
key,
|
key,
|
||||||
parameterType: "credential",
|
parameterType: "credential",
|
||||||
@@ -272,7 +280,7 @@ function WorkflowParameterEditPanel({
|
|||||||
if (!sourceParameterKey) {
|
if (!sourceParameterKey) {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Failed to save parameters",
|
title: "Failed to save parameter",
|
||||||
description: "Source parameter key is required",
|
description: "Source parameter key is required",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user