liquid_feedback_frontend
view app/main/agent/_action/accept.lua @ 1813:f9f3a657d348
Set identification to null if empty string also for creating new accounts
author | bsw |
---|---|
date | Thu Dec 02 13:33:47 2021 +0100 (2021-12-02) |
parents | 87878d24d7a8 |
children |
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 return false
7 end
9 if agent.accepted ~= nil then
10 return false
11 end
13 if param.get("rejected") then
14 agent.accepted = false
15 elseif param.get("accepted") then
16 agent.accepted = true
17 else
18 return false
19 end
21 agent:save()