(20241224) GET request array fixed.
This commit is contained in:
@@ -173,12 +173,15 @@ class TradingSymbolListRequestData(BaseModel):
|
|||||||
|
|
||||||
@field_validator("exchanges", mode = "before")
|
@field_validator("exchanges", mode = "before")
|
||||||
def ensure_list(cls, value):
|
def ensure_list(cls, value):
|
||||||
_exchg = []
|
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
if regex.match(text = value, pattern = r"\[.*\]"): _exchg = json.from_string(value)
|
if regex.match(
|
||||||
else: _exchg.append(value)
|
text = value,
|
||||||
elif isinstance(value, list):
|
pattern = r"\[.*\]",
|
||||||
_exchg = value
|
dot_all = True
|
||||||
|
): value = json.from_string(value)
|
||||||
|
else: value = [value]
|
||||||
|
elif isinstance(value, list): pass
|
||||||
|
else: value = None
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user