We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ec0acb commit c3890f4Copy full SHA for c3890f4
xobjects/hybrid_class.py
@@ -296,8 +296,9 @@ def to_dict(self, copy_to_cpu=True):
296
297
defaults = {}
298
for field in obj._XoStruct._fields:
299
+ name = obj._rename.get(field.name, field.name)
300
try:
- defaults[field.name] = field.get_default()
301
+ defaults[name] = field.get_default()
302
except (TypeError, ValueError):
303
# The above can fail with different error types
304
# if a field type is dynamic.
0 commit comments