fix: add missing whitelist decorator to convert_mt940_to_csv function

The convert_mt940_to_csv function is called from the frontend JavaScript
code but was missing the @frappe.whitelist() decorator, causing a
"Method Not Allowed" error when users try to import MT940 files.

This fix ensures the function is properly exposed as a public API endpoint
while maintaining the security improvements from the previous commit that
removed unnecessary whitelist from internal helper functions.
This commit is contained in:
Srujan N
2025-09-23 01:23:19 +00:00
parent 25cafa6044
commit 523a5d0a49

View File

@@ -142,6 +142,7 @@ def preprocess_mt940_content(content: str) -> str:
return processed_content
@frappe.whitelist()
def convert_mt940_to_csv(data_import, mt940_file_path):
doc = frappe.get_doc("Bank Statement Import", data_import)