This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 139211f  Reduce queries after successful project creation. (#4901)
139211f is described below

commit 139211f3ddf9e30fb058c659fd467b18a95d0dbe
Author: zhuangchong <[email protected]>
AuthorDate: Sat Feb 27 21:39:21 2021 +0800

    Reduce queries after successful project creation. (#4901)
---
 .../apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java
index 81e0eeb..50bee6f 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java
+++ 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java
@@ -97,8 +97,7 @@ public class ProjectServiceImpl extends BaseServiceImpl 
implements ProjectServic
                 .build();
 
         if (projectMapper.insert(project) > 0) {
-            Project insertedProject = projectMapper.queryByName(name);
-            result.put(Constants.DATA_LIST, insertedProject);
+            result.put(Constants.DATA_LIST, project);
             putMsg(result, Status.SUCCESS);
         } else {
             putMsg(result, Status.CREATE_PROJECT_ERROR);

Reply via email to