samz406 commented on a change in pull request #1684: fix get tenantCode my NPE
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/1684#discussion_r363013870
 
 

 ##########
 File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
 ##########
 @@ -644,18 +654,20 @@ public Result updateResourceContent(int resourceId, 
String content) {
         if (StringUtils.isNotEmpty(resourceViewSuffixs)) {
             List<String> strList = 
Arrays.asList(resourceViewSuffixs.split(","));
             if (!strList.contains(nameSuffix)) {
-                logger.error("resouce suffix {} not support 
updateProcessInstance,  resource id {}", nameSuffix, resourceId);
+                logger.error("resource suffix {} not support 
updateProcessInstance,  resource id {}", nameSuffix, resourceId);
                 putMsg(result, Status.RESOURCE_SUFFIX_NOT_SUPPORT_VIEW);
                 return result;
             }
         }
 
+        String tenantCode = getTenantCode(resource.getUserId(),result);
+        if (StringUtils.isEmpty(tenantCode)){
 
 Review comment:
   add error log  in getTenantCode method

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to