fix: add fallback when getting children in as_dict
This commit is contained in:
parent
7307d99227
commit
ae21d544a5
1 changed files with 1 additions and 1 deletions
|
|
@ -655,7 +655,7 @@ class BaseDocument:
|
|||
self._non_virtual_table_fieldnames if ignore_virtual_child_tables else self._table_fieldnames
|
||||
)
|
||||
for fieldname in table_fieldnames:
|
||||
children = getattr(self, fieldname) or []
|
||||
children = getattr(self, fieldname, None) or []
|
||||
doc[fieldname] = [
|
||||
d.as_dict(
|
||||
convert_dates_to_str=convert_dates_to_str,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue