Merge pull request #15340 from netchampfaris/meta-table-fields
fix: set empty lists for unset meta table fields
This commit is contained in:
commit
89648a5cf7
1 changed files with 5 additions and 0 deletions
|
|
@ -120,6 +120,11 @@ class Meta(Document):
|
|||
or (not no_nulls and value is None)):
|
||||
out[key] = value
|
||||
|
||||
# set empty lists for unset table fields
|
||||
for table_field in DOCTYPE_TABLE_FIELDS:
|
||||
if not out.get(table_field.fieldname):
|
||||
out[table_field.fieldname] = []
|
||||
|
||||
return out
|
||||
|
||||
return serialize(self)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue