fix: could not activate workflow again

This commit is contained in:
Fu Diwei 2025-09-05 16:12:19 +08:00
parent 37038469a1
commit 34749ae6e6
2 changed files with 9 additions and 2 deletions

View File

@ -268,6 +268,12 @@ const WorkflowRunHistoryTable = ({ className, style }: { className?: string; sty
width: 48,
render: (_, __, index) => index + 1,
},
{
key: "id",
title: "ID",
width: 160,
render: (_, record) => <span className="font-mono">{record.id}</span>,
},
{
key: "name",
title: t("workflow.props.name"),

View File

@ -313,7 +313,7 @@ const WorkflowList = () => {
const handleRecordActiveChange = async (workflow: WorkflowModel) => {
try {
if (!workflow.enabled && !workflow.graphContent) {
if (!workflow.enabled && !workflow.hasContent) {
message.warning(t("workflow.action.enable.errmsg.unpublished"));
return;
}
@ -326,7 +326,8 @@ const WorkflowList = () => {
setTableData((prev) => {
return prev.map((item) => {
if (item.id === workflow.id) {
return resp;
item.enabled = resp.enabled;
item.updated = resp.updated;
}
return item;
});