diff gpp/legacy/management/commands/import_old_news_comments.py @ 535:4021ea1045f7

Adding import commands for the 1.0 POTD & comments.
author Brian Neal <bgneal@gmail.com>
date Sat, 31 Dec 2011 21:34:17 +0000
parents 254db4cb6a86
children
line wrap: on
line diff
--- a/gpp/legacy/management/commands/import_old_news_comments.py	Tue Dec 27 01:15:27 2011 +0000
+++ b/gpp/legacy/management/commands/import_old_news_comments.py	Sat Dec 31 21:34:17 2011 +0000
@@ -105,9 +105,10 @@
         try:
             user = User.objects.get(username=username)
         except User.DoesNotExist:
+            old_name = username.lower()
             try:
                 user = User.objects.get(
-                        username=legacy.data.KNOWN_USERNAME_CHANGES[username])
+                        username=legacy.data.KNOWN_USERNAME_CHANGES[old_name])
             except KeyError:
                 raise User.DoesNotExist