ruanwenjun commented on a change in pull request #6592:
URL: https://github.com/apache/dolphinscheduler/pull/6592#discussion_r735066130



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -849,6 +849,8 @@ private boolean checkAndImport(User loginUser, long 
projectCode, Map<String, Obj
         }
         String processDefinitionName = 
recursionProcessDefinitionName(projectCode, processDefinition.getName(), 1);
         processDefinition.setName(processDefinitionName + "_import_" + 
DateUtils.getCurrentTimeStamp());
+        processDefinition.setId(0);

Review comment:
       Ok, I see the code. When the id is 0, it will insert, and id is not 0 it 
will update.
   
   This is really make confusion, maybe it's better to change the logic to when 
the id is null insert, and id is not null, update. 😅 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to