Only migrate to description_html if description also exists.
This commit is contained in:
parent
8268884653
commit
a2c37d0a78
@ -40,7 +40,8 @@ class MediaEntryMigration(DocumentMigration):
|
|||||||
Now that we can have rich descriptions via Markdown, we should
|
Now that we can have rich descriptions via Markdown, we should
|
||||||
update all existing entries to record the rich description versions.
|
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:
|
if not self.status:
|
||||||
for doc in self.collection.find(self.target):
|
for doc in self.collection.find(self.target):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user