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
UdfFunc udfFunc = udfFuncMapper.selectById(id);
if (udfFunc == null) {
putMsg(result, Status.RESOURCE_NOT_EXIST);
putMsg(result, Status.UDF_FUNCTION_NOT_EXIST);
return result;
}
udfFuncMapper.deleteById(id);

Loading…
Cancel
Save