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

apply published state for migrations of broken comments #19

Merged
merged 1 commit into from
Nov 2, 2012
Merged

apply published state for migrations of broken comments #19

merged 1 commit into from
Nov 2, 2012

Conversation

thet
Copy link
Member

@thet thet commented Oct 31, 2012

For migrations of comments without a valid old_status, apply the 'published' state.

i have a situation, where in line 119 of plone.app.event.browser.migration returns None:
old_status = workflow.getStatusOf(oldchain, reply)

since i had the one_state_publication workflow for discussion items applied, i solved the issue by applying the published state to those comments.

i don't know if this is acceptable as default behavior, so please review it.
if you need more information obout the comments in question, i'm happy to help.

this is the traceback i got before my change:

2012-10-31 22:28:32 ERROR Zope.SiteErrorLog 1351718912.740.436631714231 http://localhost:8880/@@comment-migration
Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module plone.app.discussion.browser.migration, line 205, in __call__
  Module plone.app.discussion.browser.migration, line 124, in migrate_replies
AttributeError: 'NoneType' object has no attribute 'get'

tisto pushed a commit that referenced this pull request Nov 2, 2012
apply published state for migrations of broken comments
@tisto tisto merged commit 2df4cf0 into plone:master Nov 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants