Skip to content

Commit

Permalink
Merge pull request #19 from thet/master
Browse files Browse the repository at this point in the history
apply published state for migrations of broken comments
  • Loading branch information
Timo Stollenwerk committed Nov 2, 2012
2 parents d2ccec6 + 882236c commit 2df4cf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog
2.2.1 (unreleased)
------------------

- For migrations of comments without a valid old_status, apply the 'published'
state.
[thet]

- Re-apply eleddy's "Revert modification date since this is fixed in
p.a.caching now." as her commit was lost later on due to some git magic.
[thet]
Expand Down
5 changes: 3 additions & 2 deletions plone/app/discussion/browser/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ def migrate_replies(context, in_reply_to, replies,
'action': None,
'actor': None,
'comment': 'Migrated workflow state',
'review_state': old_status.get(
'review_state': old_status and old_status.get(
'review_state',
new_workflow.initial_state),
new_workflow.initial_state)
or 'published',
'time': DateTime()
}
workflow.setStatusOf('comment_review_workflow',
Expand Down

0 comments on commit 2df4cf0

Please sign in to comment.