liquid_feedback_frontend
changeset 187:19fbc5c758b5
Fixed errors when displaying null delegation targets
author | bsw |
---|---|
date | Mon Nov 08 01:12:46 2010 +0100 (2010-11-08) |
parents | 28e36958c7c6 |
children | b25322737af5 |
files | app/main/delegation/_list.lua app/main/delegation/new.lua |
line diff
1.1 --- a/app/main/delegation/_list.lua Mon Nov 08 00:43:37 2010 +0100 1.2 +++ b/app/main/delegation/_list.lua Mon Nov 08 01:12:46 2010 +0100 1.3 @@ -59,11 +59,15 @@ 1.4 if incoming then 1.5 delegation_scope(delegation) 1.6 else 1.7 - execute.view{ 1.8 - module = "member", 1.9 - view = "_show_thumb", 1.10 - params = { member = delegation.trustee } 1.11 - } 1.12 + if delegation.trustee then 1.13 + execute.view{ 1.14 + module = "member", 1.15 + view = "_show_thumb", 1.16 + params = { member = delegation.trustee } 1.17 + } 1.18 + else 1.19 + ui.tag{ content = _"Delegation abandoned" } 1.20 + end 1.21 end 1.22 end 1.23 }
2.1 --- a/app/main/delegation/new.lua Mon Nov 08 00:43:37 2010 +0100 2.2 +++ b/app/main/delegation/new.lua Mon Nov 08 01:12:46 2010 +0100 2.3 @@ -83,7 +83,7 @@ 2.4 local scope = "no delegation set" 2.5 local area_delegation = Delegation:by_pk(app.session.member_id, issue.area_id) 2.6 if area_delegation then 2.7 - delegate_name = area_delegation.trustee.name 2.8 + delegate_name = area_delegation.trustee and area_delegation.trustee.name or _"abandoned" 2.9 scope = _"area" 2.10 else 2.11 local global_delegation = Delegation:by_pk(app.session.member_id)