mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: add PERM_PIN_TRAINING
This commit is contained in:
1 parent
eb62a40b01
commit
745141741b
3 files changed
+3
-2
No files matched your search
@@ -237,7 +237,7 @@ class TrainingEditHandler extends Handler {
|
||||
title: string, content: string,
|
||||
_dag: string, pin = false, description: string,
|
||||
) {
|
||||
if (this.tdoc.pin !== pin) this.checkPerm(PERM.PERM_PIN_TRAINING);
|
||||
if ((!!this.tdoc.pin) !== pin) this.checkPerm(PERM.PERM_PIN_TRAINING);
|
||||
const dag = await _parseDagJson(domainId, _dag);
|
||||
const pids = training.getPids(dag);
|
||||
assert(pids.length, new ValidationError('dag'));
|
||||
|
||||
Reference in new issue
Block a user