🎨 保存命名查询判空

This commit is contained in:
Liang Ding
2023-01-04 13:38:50 +08:00
parent e109869239
commit 2e0a9f8c43
+5
View File
@@ -17,6 +17,7 @@
package model
import (
"errors"
"os"
"path/filepath"
"sync"
@@ -206,6 +207,10 @@ func RemoveCriterion(name string) (err error) {
}
func SetCriterion(criterion *Criterion) (err error) {
if "" == criterion.Name {
return errors.New(Conf.Language(142))
}
criteriaLock.Lock()
defer criteriaLock.Unlock()