fix: allow tables to be sent in webhook

This commit is contained in:
Rohan Bansal 2019-12-31 13:24:13 +05:30
parent 9ab56d65ab
commit 547a4d3ca0

View file

@ -275,7 +275,7 @@ class BaseDocument(object):
doc["doctype"] = self.doctype
for df in self.meta.get_table_fields():
children = self.get(df.fieldname) or []
doc[df.fieldname] = [d.as_dict(no_nulls=no_nulls) for d in children]
doc[df.fieldname] = [d.as_dict(convert_dates_to_str=convert_dates_to_str, no_nulls=no_nulls) for d in children]
if no_nulls:
for k in list(doc):