mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-19 14:55:13 +00:00
fix error when downloading empty report
This commit is contained in:
@@ -225,11 +225,10 @@ def get_datev_csv(data):
|
||||
]
|
||||
|
||||
empty_df = pd.DataFrame(columns=columns)
|
||||
|
||||
data_df = pd.DataFrame.from_records(data)
|
||||
data_df["Belegdatum"] = pd.to_datetime(data_df["Belegdatum"])
|
||||
|
||||
result = empty_df.append(data_df)
|
||||
result["Belegdatum"] = pd.to_datetime(result["Belegdatum"])
|
||||
|
||||
return result.to_csv(
|
||||
sep=b';',
|
||||
|
||||
Reference in New Issue
Block a user