Browse Source

1 Modify judgment order(调整顺序,先判断是否存在)

2 before delete check entity exist
pull/2/head
lilin 5 years ago
parent
commit
62f54eed7f
  1. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UdfFuncService.java

2
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UdfFuncService.java

@ -306,7 +306,7 @@ public class UdfFuncService extends BaseService{
//check exist //check exist
UdfFunc udfFunc = udfFuncMapper.selectById(id); UdfFunc udfFunc = udfFuncMapper.selectById(id);
if (udfFunc == null) { if (udfFunc == null) {
putMsg(result, Status.RESOURCE_NOT_EXIST); putMsg(result, Status.UDF_FUNCTION_NOT_EXIST);
return result; return result;
} }
udfFuncMapper.deleteById(id); udfFuncMapper.deleteById(id);

Loading…
Cancel
Save