liquid_feedback_frontend
view app/main/agent/_action/accept.lua @ 1841:e6983d79d74f
Fix Lua error on <ol> or <ul> tag at end of input to util.html_is_safe(...)
author | jbe |
---|---|
date | Thu Feb 03 15:21:45 2022 +0100 (2022-02-03) |
parents | 32cc544d5a5b |
children | 87878d24d7a8 |
line source
1 local controlled_id = param.get("controlled_id")
3 local agent = Agent:by_pk(controlled_id, app.session.member_id)
5 if not agent then
6 print("A")
7 return false
8 end
10 if agent.accepted ~= nil then
11 print("B")
12 return false
13 end
15 if param.get("rejected") then
16 print("C")
17 agent.accepted = false
18 elseif param.get("accepted") then
19 print("D")
20 agent.accepted = true
21 else
22 print("E")
23 return false
24 end
25 print("F")
26 agent:save()