Browse Source

unique check before import ProcessDefinitions

pull/2/head
张世鸣 5 years ago
parent
commit
ec2509fc46
  1. 9
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java

9
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java

@ -783,9 +783,12 @@ public class ProcessDefinitionService extends BaseDAGService {
} }
//unique check //unique check
result = verifyProcessDefinitionName(loginUser, currentProjectName, processDefinitionName); Map<String, Object> checkResult = verifyProcessDefinitionName(loginUser, currentProjectName, processDefinitionName);
Status status = (Status) result.get(Constants.STATUS); Status status = (Status) checkResult.get(Constants.STATUS);
if (!Status.SUCCESS.equals(status)) { if (Status.SUCCESS.equals(status)) {
putMsg(result, Status.SUCCESS);
} else {
result.putAll(checkResult);
return false; return false;
} }

Loading…
Cancel
Save