From 76a06f54b5fe77452845b17ac037266d5271d970 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Tue, 16 May 2023 16:47:37 +0530 Subject: [PATCH] post user feedback traceback --- smart_service/apis/addon_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smart_service/apis/addon_api.py b/smart_service/apis/addon_api.py index dc39eaf..5d92505 100644 --- a/smart_service/apis/addon_api.py +++ b/smart_service/apis/addon_api.py @@ -216,6 +216,7 @@ def feedback(args=None, request=None): for x in f: file_name = x file_data = f[x] + file_url = "/home/ubuntu/frappe-bench/sites/" + site_name + "/public/files/" + file_name with open(file_url, "wb") as img: img.write(base64.b64decode(file_data)) @@ -232,7 +233,7 @@ def feedback(args=None, request=None): file_response.append(ret) api = {"isSuccessful": True, "name": usr_fdbk.name, "files": file_response} except Exception as e: - api = {"status": 0, "error": "Failed to create Feedback"} + api = {"status": 0, "error": str(frappe.get_traceback())} else: api = {"status": 0, "error": "Check argument: args"} else: