From 18ef0a66cb91d9dfe6406f8ade6cfb2cff36492e Mon Sep 17 00:00:00 2001 From: jackfanwan <61672564+jackfanwan@users.noreply.github.com> Date: Tue, 11 Oct 2022 10:53:25 +0800 Subject: [PATCH] Set the id to null when copying t_ds_schedules (#12280) Co-authored-by: fanwanlong --- .../api/service/impl/ProcessDefinitionServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java index 8758b25dd9..c1b13f7d32 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java @@ -2205,6 +2205,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro // copy timing configuration Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(oldProcessDefinitionCode); if (scheduleObj != null) { + scheduleObj.setId(null); scheduleObj.setProcessDefinitionCode(processDefinition.getCode()); scheduleObj.setReleaseState(ReleaseState.OFFLINE); scheduleObj.setCreateTime(date);