From e0cc67368370a0792bb2b2940e1b3d5292046774 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 2 Jan 2010 19:45:05 +0000 Subject: [PATCH] count old comments only during migration. show error log when comments could not be migrated. svn path=/plone.app.discussion/trunk/; revision=32767 --- plone/app/discussion/browser/migration.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plone/app/discussion/browser/migration.py b/plone/app/discussion/browser/migration.py index 7509249..545eab2 100644 --- a/plone/app/discussion/browser/migration.py +++ b/plone/app/discussion/browser/migration.py @@ -145,7 +145,11 @@ class View(BrowserView): log("\n") log("%s of %s comments migrated." - % (self.total_comments_migrated, count_discussion_items)) + % (self.total_comments_migrated, count_comments_old)) + + if self.total_comments_migrated != count_comments_old: + log("%s comments could not be migrated." % (count_comments_old - self.total_comments_migrated)) + log("Please make sure your portal catalog is up-to-date.") if self.request.has_key("dry_run"): transaction.abort()