Skip to content

Commit 1bdae4e

Browse files
committed
Merge branch 'main' into PythonVarsInHybridClass
2 parents aa874ff + 06c9845 commit 1bdae4e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

xobjects/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.5.3"
1+
__version__ = "0.5.4"

xobjects/hybrid_class.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,9 @@ def to_dict(self, copy_to_cpu=True):
296296

297297
defaults = {}
298298
for field in obj._XoStruct._fields:
299+
name = obj._rename.get(field.name, field.name)
299300
try:
300-
defaults[field.name] = field.get_default()
301+
defaults[name] = field.get_default()
301302
except (TypeError, ValueError):
302303
# The above can fail with different error types
303304
# if a field type is dynamic.

0 commit comments

Comments
 (0)