You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ga...@apache.org on 2020/06/04 09:27:06 UTC
[incubator-dolphinscheduler] branch dev-1.3.0 updated: merge method
updateuser if and fix bug#2892
This is an automated email from the ASF dual-hosted git repository.
gabrywu pushed a commit to branch dev-1.3.0
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev-1.3.0 by this push:
new 3e7dc7d merge method updateuser if and fix bug#2892
new ae9afcf Merge pull request #2898 from 597365581/patch-6
3e7dc7d is described below
commit 3e7dc7da8d99646192588a6ec0e02bebafb37605
Author: 小清 <62...@users.noreply.github.com>
AuthorDate: Thu Jun 4 16:26:26 2020 +0800
merge method updateuser if and fix bug#2892
fix [BUG] When editing user information, clear the phone number, the database table t_ds_user.phone is not cleared #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);