Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Traceback for CCEmails rendering in publish view #101

Merged
merged 2 commits into from Nov 2, 2020

Conversation

ramonski
Copy link
Contributor

Description of the issue/feature this PR addresses

This PR fixes a traceback that occurs for empty CCEmails

Traceback

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'

Current behavior before PR

Traceback occurs on publish

Desired behavior after PR is merged

No Traceback occurs on publish

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

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'
@xispa xispa merged commit a6f96bf into 2.x Nov 2, 2020
@xispa xispa deleted the fix-ccemails-traceback branch November 2, 2020 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants