mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 保存命名查询判空
This commit is contained in:
parent
e109869239
commit
2e0a9f8c43
1 changed files with 5 additions and 0 deletions
|
|
@ -17,6 +17,7 @@
|
||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
@ -206,6 +207,10 @@ func RemoveCriterion(name string) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetCriterion(criterion *Criterion) (err error) {
|
func SetCriterion(criterion *Criterion) (err error) {
|
||||||
|
if "" == criterion.Name {
|
||||||
|
return errors.New(Conf.Language(142))
|
||||||
|
}
|
||||||
|
|
||||||
criteriaLock.Lock()
|
criteriaLock.Lock()
|
||||||
defer criteriaLock.Unlock()
|
defer criteriaLock.Unlock()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue