juju-solutions / review-queue

Juju Review Queue webapp
4 stars 4 forks source link

Render error on leaving a comment #47

Closed johnsca closed 7 years ago

johnsca commented 7 years ago

Pete was attempting to leave a review comment on https://review.jujucharms.com/reviews/15 and got an ISE on https://review.jujucharms.com/revisions/37/comment for which the following showed up in the email:

Traceback (most recent call last):
  File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid_mako/__init__.py", line 148, in __call__
    result = template.render_unicode(**system)
  File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/mako/template.py", line 454, in render_unicode
    as_unicode=True)
  File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/mako/runtime.py", line 829, in _render
    **_kwargs_for_callable(callable_, data))
  File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/mako/runtime.py", line 864, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/mako/runtime.py", line 890, in _exec_template
    callable_(context, *args, **kwargs)
  File "/opt/reviewqueue/reviewqueue/templates/emails/comment.mako", line 3, in render_body
    <blockquote>${comment.text | h.linesplit}</blockquote>
NameError: global name 'h' is not defined
johnsca commented 7 years ago

Comment being left:

NestedMultiDict([('comment', u'Hi,\r\n\r\nThank you for all the hard work on this charm. The tests are currently failing due to a linter error, and due to tests/10-deploy.py not being marked as executable.\r\n\r\n(After those two issues are fixed, the tests will still fail because the storage charm requires acceptance of terms -- we can run the tests manually in that case.)'), ('vote', u'0')])

Perhaps related to multi-line comments?

johnsca commented 7 years ago

Nevermind, multi-line had nothing to do with it. Also failed on:

NestedMultiDict([('comment', u'Hi. Thank you for all the hard work on this charm. The tests are currently failing due to a linter error, and due to tests/10-deploy.py not being marked as executable. (After those two issues are fixed, the tests will still fail because the storage charm requires acceptance of terms -- we can run the tests manually in that case.)'), ('vote', u'0')])