Merge pull request #19904 from prssanna/file-upload-fix

fix: Bank statement not getting attached in Bank Reconciliation
This commit is contained in:
Deepesh Garg 2019-12-12 15:19:54 +05:30 committed by GitHub
commit 859b464a57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,8 +15,8 @@ def upload_bank_statement():
with open(frappe.uploaded_file, "rb") as upfile:
fcontent = upfile.read()
else:
from frappe.utils.file_manager import get_uploaded_content
fname, fcontent = get_uploaded_content()
fcontent = frappe.local.uploaded_file
fname = frappe.local.uploaded_filename
if frappe.safe_encode(fname).lower().endswith("csv".encode('utf-8')):
from frappe.utils.csvutils import read_csv_content