You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/11/02 11:48:26 UTC

[GitHub] [dolphinscheduler] zhongjiajie commented on a change in pull request #6668: Fix process definitions exists check error

zhongjiajie commented on a change in pull request #6668:
URL: https://github.com/apache/dolphinscheduler/pull/6668#discussion_r740979033



##########
File path: dolphinscheduler-python/src/main/java/org/apache/dolphinscheduler/server/PythonGatewayServer.java
##########
@@ -177,7 +177,7 @@ public Long createOrUpdateProcessDefinition(String userName,
         long projectCode = project.getCode();
         Map<String, Object> verifyProcessDefinitionExists = processDefinitionService.verifyProcessDefinitionName(user, projectCode, name);
 
-        if (verifyProcessDefinitionExists.get(Constants.STATUS) != Status.SUCCESS) {
+        if (verifyProcessDefinitionExists.get(Constants.STATUS) == Status.PROCESS_DEFINITION_NAME_EXIST) {

Review comment:
       Hi wenjun, we would create project with assigned user before code running to this line. So I think we nearly zero percent to miss this situation. Until other process drop project or user object after I create it just now.




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org