sartography / cr-connect

0 stars 0 forks source link

Jinja 'splitlines' error #569

Closed calexh-sar closed 2 years ago

calexh-sar commented 2 years ago

Recently noticed that Sentry was displaying this AttributeError when running a Approval workflows. Mike took at look at it and noted 'It looks like we pass it nothing as a string'. Dan also noted:

very weird, we actually check for none, before passing in the thing.
     if not raw_doc:
                return ""

            try:
                return JinjaService.get_content(raw_doc, spiff_task.data)

This is not throwing a frontend error displayed to the user.

calexh-sar commented 2 years ago

Moving this into New Issues. Have not seen for a while, but not sure if it is fixed or I am not working in the area of code that tripped this error.

calexh-sar commented 2 years ago

Fix by adding d('', True) to the beginning of a wordwrap filter, like this: {{pi.experience|d('', True)|wordwrap(70)| replace('\n', '\n  ')}}