bsw@16: local issue_id = assert(param.get("issue_id", atom.integer), "no issue id given") bsw@16: bsw@16: local interest = Interest:by_pk(issue_id, app.session.member.id) bsw@16: bsw@16: local issue = Issue:new_selector():add_where{ "id = ?", issue_id }:for_share():single_object_mode():exec() bsw@16: bsw@16: if issue.closed then bsw@16: slot.put_into("error", _"This issue is already closed.") bsw@16: return false bsw@16: elseif issue.half_frozen then bsw@16: slot.put_into("error", _"This issue is already frozen.") bsw@16: return false bsw@16: end bsw@16: bsw@16: interest.voting_requested = param.get("voting_requested", atom.boolean) bsw@16: bsw@16: if interest.voting_requested == true then bsw@16: error("not implemented yet") bsw@16: end bsw@16: bsw@16: interest:save() bsw@16: bsw@16: slot.put_into("notice", _"Voting request updated")