fix(api): Fix incorrect handling of `Variable` types in `VariablePool`

pull/20699/head
QuantumGhost 1 year ago
parent 7ee95dbc1c
commit 85ab1dc8d9

@ -1,11 +1,12 @@
import json
import sys
from collections.abc import Mapping, Sequence
from typing import Any
import sys
from pydantic import BaseModel, ConfigDict, field_validator
from core.file import File
from .types import SegmentType

@ -96,7 +96,7 @@ class VariablePool(BaseModel):
if isinstance(value, Variable):
variable = value
if isinstance(value, Segment):
elif isinstance(value, Segment):
variable = variable_factory.segment_to_variable(segment=value, selector=selector)
else:
segment = variable_factory.build_segment(value)

Loading…
Cancel
Save