# HG changeset patch # User bsw # Date 1330198591 -3600 # Node ID a72a389399fcb167f84d2458c9797d24b614afe4 # Parent 44f9a09ea51cddd01903edf898f82f4e3ba2f9df Fixed to issues with modified delegation code diff -r 44f9a09ea51c -r a72a389399fc app/main/delegation/_action/update.lua --- a/app/main/delegation/_action/update.lua Sat Feb 25 17:34:51 2012 +0100 +++ b/app/main/delegation/_action/update.lua Sat Feb 25 20:36:31 2012 +0100 @@ -12,6 +12,9 @@ area_id = nil end +local delegation = Delegation:by_pk(truster_id, unit_id, area_id, issue_id) + + if param.get("delete") or trustee_id == -1 then if delegation then @@ -47,8 +50,6 @@ error("access denied") end - local delegation = Delegation:by_pk(truster_id, unit_id, area_id, issue_id) - if not delegation then delegation = Delegation:new() delegation.truster_id = truster_id diff -r 44f9a09ea51c -r a72a389399fc app/main/delegation/new.lua --- a/app/main/delegation/new.lua Sat Feb 25 17:34:51 2012 +0100 +++ b/app/main/delegation/new.lua Sat Feb 25 20:36:31 2012 +0100 @@ -103,7 +103,7 @@ end records = { { id = -1, name = text_apply }, - { id = 0, name = text_abandom } + { id = 0, name = text_abandon } } elseif area then local delegate_name = ""