diff --git a/india_compliance/gst_india/doctype/gst_return_log/gst_return_log.py b/india_compliance/gst_india/doctype/gst_return_log/gst_return_log.py index 9b61b7ace3..5bd1ddccba 100644 --- a/india_compliance/gst_india/doctype/gst_return_log/gst_return_log.py +++ b/india_compliance/gst_india/doctype/gst_return_log/gst_return_log.py @@ -2,6 +2,7 @@ # For license information, please see license.txt import gzip +import json from datetime import datetime import frappe @@ -13,6 +14,7 @@ get_link_to_form, getdate, ) +from frappe.utils.response import json_handler from india_compliance.gst_india.doctype.gst_return_log.generate_gstr_1 import ( FileGSTR1, @@ -316,7 +318,9 @@ def get_file_doc(doctype, docname, attached_to_field): def get_compressed_data(json_data): - return gzip.compress(frappe.safe_encode(frappe.as_json(json_data))) + return gzip.compress( + frappe.safe_encode(json.dumps(json_data, default=json_handler, separators=(",", ":"))) + ) def get_decompressed_data(content):