diff --git a/import_padma.py b/import_padma.py index 4ac8a9e..e2371a2 100755 --- a/import_padma.py +++ b/import_padma.py @@ -65,6 +65,8 @@ for u in users: username = u['username'].strip().lower() user, created = User.objects.get_or_create(username=username) user.email = u['email'] + if not '@' in user.email: + user.email = '' user.password = u['password'] user.date_joined = datetime.strptime(u['created'], '%Y-%m-%dT%H:%M:%SZ') user.save() @@ -78,7 +80,8 @@ for u in users: s = SessionData() s.user = user s.session_key = hashlib.sha1(user.username).hexdigest() - s.firstseen = s.lastseen = user.date_joined + s.lastseen = user.date_joined + s.firstseen = user.date_joined s.timesseen = 1 s.save() for g in u['groups']: