This commit is contained in:
Daniel 2024-09-27 00:05:48 +08:00
parent 459b700e26
commit 800dec29df
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 12 additions and 3 deletions

View file

@ -203,8 +203,8 @@ func LoadTreeByBlockIDWithReindex(id string) (ret *parse.Tree, err error) {
}
func LoadTreeByBlockID(id string) (ret *parse.Tree, err error) {
if "" == id {
logging.LogErrorf("block id is empty")
if !ast.IsNodeIDPattern(id) {
logging.LogErrorf("block id is invalid [id=%s]", id)
return nil, ErrTreeNotFound
}