소스 검색

fix(variables): NoneVariable should inherit from NoneSegment. (#6584)

tags/0.6.15
-LAN- 1 년 전
부모
커밋
85a883e281
No account linked to committer's email address
2개의 변경된 파일7개의 추가작업 그리고 14개의 파일을 삭제
  1. 4
    11
      api/core/app/segments/types.py
  2. 3
    3
      api/core/app/segments/variables.py

+ 4
- 11
api/core/app/segments/types.py 파일 보기

@@ -2,17 +2,10 @@ from enum import Enum


class SegmentType(str, Enum):
STRING = 'string'
NONE = 'none'
NUMBER = 'number'
FILE = 'file'

STRING = 'string'
SECRET = 'secret'

OBJECT = 'object'

ARRAY = 'array'
ARRAY_STRING = 'array[string]'
ARRAY_NUMBER = 'array[number]'
ARRAY_OBJECT = 'array[object]'
ARRAY_FILE = 'array[file]'
NONE = 'none'
OBJECT = 'object'
FILE = 'file'

+ 3
- 3
api/core/app/segments/variables.py 파일 보기

@@ -6,7 +6,7 @@ from pydantic import Field
from core.file.file_obj import FileVar
from core.helper import encrypter

from .segments import Segment, StringSegment
from .segments import NoneSegment, Segment, StringSegment
from .types import SegmentType


@@ -83,6 +83,6 @@ class SecretVariable(StringVariable):
return encrypter.obfuscated_token(self.value)


class NoneVariable(Variable):
class NoneVariable(NoneSegment, Variable):
value_type: SegmentType = SegmentType.NONE
value: None = None
value: None = None

Loading…
취소
저장