Browse Source

fix sonar bug: change condition & not enough arguments (#1705)

pull/2/head
Yelli 5 years ago committed by Tboy
parent
commit
3593a60374
  1. 5
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java

5
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java

@ -457,10 +457,13 @@ public class ProcessDao {
if(tenantId >= 0){ if(tenantId >= 0){
tenant = tenantMapper.queryById(tenantId); tenant = tenantMapper.queryById(tenantId);
} }
if(tenant == null){ if(null == tenant){
User user = userMapper.selectById(userId); User user = userMapper.selectById(userId);
if (null != user) {
tenant = tenantMapper.queryById(user.getTenantId()); tenant = tenantMapper.queryById(user.getTenantId());
} }
}
return tenant; return tenant;
} }

Loading…
Cancel
Save