Add prefix "*act" for scheduler filter

This commit is contained in:
TeoV
2019-11-08 10:07:26 +02:00
committed by Dan Christian Bogos
parent 2f3f7d2dea
commit 7c95645650
4 changed files with 7 additions and 3 deletions

View File

@@ -67,7 +67,10 @@ func (t *Task) FieldAsString(fldPath []string) (s string, err error) {
if len(fldPath) == 0 {
return
}
switch fldPath[0] {
if fldPath[0] != utils.MetaAct || len(fldPath) < 2 {
return "", utils.ErrPrefixNotFound(strings.Join(fldPath, utils.NestingSep))
}
switch fldPath[1] {
case utils.UUID:
return t.Uuid, nil
case utils.AccountID: