From 17bb7c388b1f6190a43945e8e2f3e96bb826fb72 Mon Sep 17 00:00:00 2001 From: cfdv Date: Mon, 20 Jun 2011 19:28:02 -0500 Subject: [PATCH] removes unecessary dependence on existence of username for User migration01, + fix whitespace issues --- mediagoblin/db/migrations.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index a3e7133c..29bc112f 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -54,16 +54,15 @@ class UserMigration(DocumentMigration): """ User can elaborate profile with home page and biography """ - self.target = {'username': {'$exists': True}, 'url': {'$exists': False}, - 'bio': {'$exists': False}} + self.target = {'url': {'$exists': False}, + 'bio': {'$exists': False}} if not self.status: for doc in self.collection.find(self.target): self.update = { - '$set': { - 'url': '', - 'bio': ''}} + '$set': {'url': '', + 'bio': ''}} self.collection.update( self.target, self.update, multi=True, safe=True) -MIGRATE_CLASSES = ['MediaEntry','User'] +MIGRATE_CLASSES = ['MediaEntry', 'User'] -- 2.25.1