diff gpp/legacy/management/commands/import_old_news.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.py	Tue Dec 27 01:15:27 2011 +0000
+++ b/gpp/legacy/management/commands/import_old_news.py	Sat Dec 31 21:34:17 2011 +0000
@@ -110,9 +110,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