fix: exporter.py

Co-authored-by: Faris Ansari <netchampfaris@users.noreply.github.com>
This commit is contained in:
Rucha Mahabal 2020-09-23 09:43:57 +05:30 committed by GitHub
parent 175c2fdb65
commit bb4e6faad5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,12 +147,13 @@ class Exporter:
if df.parent == doctype:
if df.is_child_table_field and df.child_table_df.fieldname != parentfield:
continue
row[i] = doc.get(df.fieldname, "")
value = doc.get(df.fieldname, None)
if df.fieldtype == "Duration":
value = flt(doc.get(df.fieldname, 0))
row[i] = format_duration(value, df.hide_days)
value = flt(value or 0)
value = format_duration(value, df.hide_days)
row[i] = value
return rows
def get_data_as_docs(self):