Skip to content

Commit

Permalink
Fix Traceback for CCEmails rendering in publish view (#101)
Browse files Browse the repository at this point in the history
* Fix Traceback for CCEmails rendering

Traceback (innermost last):
  Module ZServer.ZPublisher.Publish, line 144, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZServer.ZPublisher.Publish, line 44, in call_object
  Module senaite.impress.publishview, line 95, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 367, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 307, in render
  Module chameleon.template, line 214, in render
  Module chameleon.template, line 192, in render
  Module 51ed7a26bf10c8da6bb343541b82a273, line 1342, in render
  Module zope.tales.pythonexpr, line 73, in __call__
   - __traceback_info__: (model.CCEmails.split(','))
  Module <string>, line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'split'

* Changelog updated
  • Loading branch information
ramonski committed Nov 2, 2020
1 parent 606c7ef commit a6f96bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
2.0.0rc3 (unreleased)
---------------------

- No changes yet
- #101 Fix Traceback for CCEmails rendering in publish view


2.0.0rc2 (2020-10-13)
Expand Down
4 changes: 3 additions & 1 deletion src/senaite/impress/templates/publish.pt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@
</td>
<!-- CC Emails -->
<td>
<tal:ccemails repeat="ccemail python:model.CCEmails.split(',')">
<tal:ccemails define="ccemails model/CCEmails"
condition="ccemails"
repeat="ccemail python:model.CCEmails.split(',')">
<a href="#"
tal:attributes="href string:mailto:${ccemail}">
<div tal:content="ccemail" />
Expand Down

0 comments on commit a6f96bf

Please sign in to comment.