You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by le...@apache.org on 2020/06/17 10:46:20 UTC

[incubator-dolphinscheduler] branch 1.3.0-release updated: Merge pull request #2898 from 597365581/patch-6

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

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


The following commit(s) were added to refs/heads/1.3.0-release by this push:
     new 0c85a2f  Merge pull request #2898 from 597365581/patch-6
0c85a2f is described below

commit 0c85a2f0e5d067d946987823dbcd56e1f3f340b6
Author: gabry.wu <ga...@apache.org>
AuthorDate: Thu Jun 4 17:26:59 2020 +0800

    Merge pull request #2898 from 597365581/patch-6
    
    merge method updateuser if and fix bug#2892
---
 .../org/apache/dolphinscheduler/api/service/UsersService.java  | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java
index 815dcb0..8d79c8e 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java
@@ -306,13 +306,11 @@ public class UsersService extends BaseService {
             user.setEmail(email);
         }
 
-        if (StringUtils.isNotEmpty(phone)) {
-            if (!CheckUtils.checkPhone(phone)){
-                putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR,phone);
-                return result;
-            }
-            user.setPhone(phone);
+        if (StringUtils.isNotEmpty(phone) && !CheckUtils.checkPhone(phone)) {
+            putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR,phone);
+            return result;
         }
+        user.setPhone(phone);
         user.setQueue(queue);
         Date now = new Date();
         user.setUpdateTime(now);