Skip to content

Commit

Permalink
[BugFix] CLI: /technical/sma --chart (#6594)
Browse files Browse the repository at this point in the history
* fix unhandled exception

* mypy
  • Loading branch information
deeleeramone authored Jul 19, 2024
1 parent 6deabd7 commit b588309
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openbb_platform/core/openbb_core/app/model/obbject.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ def is_list_of_basemodel(items: Union[List[T], T]) -> bool:
# List[BaseModel]
elif is_list_of_basemodel(res):
dt: Union[List[Data], Data] = res # type: ignore
r = dt[0] if isinstance(dt, list) else dt
if all(
r = dt[0] if isinstance(dt, list) and len(dt) == 1 else None # type: ignore
if r and all(
prop.get("type") == "array"
for prop in r.schema()["properties"].values()
for prop in r.model_json_schema()["properties"].values() # type: ignore
):
sort_columns = False
df = DataFrame(r.model_dump(exclude_unset=True))
df = DataFrame(r.model_dump(exclude_unset=True, exclude_none=True)) # type: ignore
else:
df = basemodel_to_df(dt, index)
sort_columns = False
Expand Down

0 comments on commit b588309

Please sign in to comment.