diff --git a/apps/forums/management/commands/migrate_forum.py b/apps/forums/management/commands/migrate_forum.py index f757b0fac4c..cc05045baa1 100644 --- a/apps/forums/management/commands/migrate_forum.py +++ b/apps/forums/management/commands/migrate_forum.py @@ -35,9 +35,11 @@ def get_fake_user(): return User.objects.get(username='FakeUser') except User.DoesNotExist: tiki_user = TikiUser.objects.create( - login='FakeUser', password='md5$pass', hash='md5$hash') + login='FakeUser', password='md5$pass', hash='md5$hash', + email='nobody@support.mozilla.com') return User.objects.create( - id=tiki_user.userId, username='FakeUser') + id=tiki_user.userId, username='FakeUser', + email='nobody@support.mozilla.com') def get_django_user(tiki_thread): diff --git a/lib/identicons/management/commands/build_avatars.py b/lib/identicons/management/commands/build_avatars.py index 8803cffefae..7a1f98a085d 100644 --- a/lib/identicons/management/commands/build_avatars.py +++ b/lib/identicons/management/commands/build_avatars.py @@ -44,7 +44,10 @@ def handle(self, **options): for u in users: print 'Hashing %s' % u.login # Ugh, this part gets ugly. - h = hashlib.md5(u.email.encode('utf-8')).hexdigest() + try: + h = hashlib.md5(u.email.encode('utf-8')).hexdigest() + except AttributeError: + continue i = int(h, 16) iname = '/tmp/%s.png' % h