Просмотр исходного кода

Set the id to null when copying t_ds_schedules (#12280)

Co-authored-by: fanwanlong <fanwanlong@kezaihui.com>
jackfanwan 2 лет назад
Родитель
Сommit
18ef0a66cb

+ 1 - 0
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);