# HG changeset patch # User bsw # Date 1345418409 -7200 # Node ID 23e12fe721d4c4d4ce6d1f003f41262c51f6a740 # Parent fe39c1fb541b825eb1f7886c18d6a84a3adc4699 Fix in voting comment form diff -r fe39c1fb541b -r 23e12fe721d4 app/main/vote/list.lua --- a/app/main/vote/list.lua Mon Aug 20 01:06:20 2012 +0200 +++ b/app/main/vote/list.lua Mon Aug 20 01:20:09 2012 +0200 @@ -436,14 +436,15 @@ end if (readonly or direct_voter.comment) and not preview then local text - if direct_voter.comment_changed then + if direct_voter and direct_voter.comment_changed then text = _("Voting comment (last updated: #{timestamp})", { timestamp = format.timestamp(direct_voter.comment_changed) }) - else + elseif direct_voter and direct_voter.comment then text = _"Voting comment" end + if text then ui.heading{ level = "2", content = text } - - if direct_voter.comment then + end + if direct_voter and direct_voter.comment then local rendered_comment = direct_voter:get_content('html') ui.container{ attr = { class = "member_statement" }, content = function() slot.put(rendered_comment)