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. 7
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java

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

@ -457,9 +457,12 @@ 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);
tenant = tenantMapper.queryById(user.getTenantId());
if (null != user) {
tenant = tenantMapper.queryById(user.getTenantId());
}
} }
return tenant; return tenant;
} }

Loading…
Cancel
Save