Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/tcgdexsdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ def _urlopen(url: str, _: float) -> str:
def _from_dict(cls: Type[_TM], data: dict, tcgdex) -> _TM:
self = from_dict(cls, data)
self.sdk = tcgdex

for _, attr_value in self.__dict__.items():
if isinstance(attr_value, list):
for item in attr_value:
if hasattr(item, "sdk"):
item.sdk = tcgdex
elif hasattr(attr_value, "sdk"):
attr_value.sdk = tcgdex

return self


Expand Down
Loading