Commit d7fcc71d authored by Łukasz Nowak's avatar Łukasz Nowak

Minimise amount of errors on server and client side.

parent 25fbb691
......@@ -50,14 +50,19 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>result_list = context.AcknowledgementTool_getUserUnreadAcknowledgementList()\n
if len(result_list):\n
result_list = [result_list[0]]\n
<value> <string>import json\n
person = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
if person is not None:\n
result_list = context.AcknowledgementTool_getUserUnreadAcknowledgementList()\n
if len(result_list):\n
result_list = [result_list[0]]\n
\n
import json\n
result = {\n
"result": [{"text_content": "%s" % x[\'text_content\'], "acknowledge_url": "%s" % x[\'acknowledge_url\']} for x in result_list]\n
}\n
\n
result = {\n
"result": [{"text_content": "%s" % x[\'text_content\'], "acknowledge_url": "%s" % x[\'acknowledge_url\']} for x in result_list]\n
}\n
else:\n
result = {\'result\': []}\n
\n
context.REQUEST.RESPONSE.setHeader(\'Content-Type\', \'application/json\')\n
return json.dumps(result)\n
......
431
\ No newline at end of file
432
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment