Skip to content

Commit

Permalink
Fix coercion from dict for native dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
langmm committed Sep 25, 2023
1 parent a5eaf87 commit 28344a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yggdrasil/serialize/SerializeBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def dict2object(cls, obj, **kwargs):
object: Serializable object.
"""
if len(obj) > 1:
return obj
assert len(obj) == 1
return list(obj.values())[0]

Expand Down

0 comments on commit 28344a8

Please sign in to comment.