From a2c37d0a78f939ee208225840f83a90fd698aedf Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 20 Jun 2011 21:02:46 -0500 Subject: [PATCH] Only migrate to description_html if description also exists. --- mediagoblin/db/migrations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index b87988fe..aacbf079 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -40,7 +40,8 @@ class MediaEntryMigration(DocumentMigration): Now that we can have rich descriptions via Markdown, we should update all existing entries to record the rich description versions. """ - self.target = {'description_html': {'$exists': False}} + self.target = {'description_html': {'$exists': False}, + 'description': {'$exists': True}} if not self.status: for doc in self.collection.find(self.target): -- 2.25.1