From: cfdv Date: Tue, 21 Jun 2011 00:28:02 +0000 (-0500) Subject: removes unecessary dependence on existence of username for User migration01, + fix... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=17bb7c388b1f6190a43945e8e2f3e96bb826fb72;p=mediagoblin.git removes unecessary dependence on existence of username for User migration01, + fix whitespace issues --- 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']