liquid_feedback_frontend
diff app/main/delegation/_action/update.lua @ 300:cb9ccdd024f2
Do not check voting rights for virtual delegation target 'abandon'
author | bsw |
---|---|
date | Sat Feb 25 22:29:33 2012 +0100 (2012-02-25) |
parents | d39fa6c0ff0b |
children | 5ca9de94cb13 |
line diff
1.1 --- a/app/main/delegation/_action/update.lua Sat Feb 25 22:27:41 2012 +0100 1.2 +++ b/app/main/delegation/_action/update.lua Sat Feb 25 22:29:33 2012 +0100 1.3 @@ -34,7 +34,11 @@ 1.4 1.5 else 1.6 1.7 - local trustee = Member:by_id(trustee_id) 1.8 + local trustee 1.9 + 1.10 + if trustee_id then 1.11 + trustee = Member:by_id(trustee_id) 1.12 + end 1.13 1.14 local check_unit_id 1.15 if unit_id then 1.16 @@ -48,7 +52,7 @@ 1.17 check_unit_id = area.unit_id 1.18 end 1.19 1.20 - if not trustee:has_voting_right_for_unit_id(check_unit_id) then 1.21 + if trustee and not trustee:has_voting_right_for_unit_id(check_unit_id) then 1.22 slot.put_into("error", _"Trustee has no voting right in this unit") 1.23 return false 1.24 end