Skip to content

Commit

Permalink
Merge pull request #10 from take-kun/release/0.2.2
Browse files Browse the repository at this point in the history
Release/0.2.2
  • Loading branch information
take-kun authored Jan 26, 2023
2 parents 6cb06fc + 8422e86 commit 326b390
Show file tree
Hide file tree
Showing 5 changed files with 573 additions and 495 deletions.
2 changes: 2 additions & 0 deletions mercapi/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def __getitem__(self, key):
f"{key} is not a valid member of {self.__class__.__name__}"
)
res = getattr(self, key)
if isinstance(res, list):
return [dict(x) if issubclass(type(x), ResponseModel) else x for x in res]
if not issubclass(type(res), ResponseModel):
return res
return dict(res)
Expand Down
Loading

0 comments on commit 326b390

Please sign in to comment.