Browse Source

post user feedback traceback

master
venkataakhil 2 years ago
parent
commit
76a06f54b5
  1. 3
      smart_service/apis/addon_api.py

3
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:

Loading…
Cancel
Save