I'm trying to catch any exceptions from user.get_profile() during
account creation in order to create the profile

I create the user, authenticate them, log them in, and then try to
get_profile. To start out, the user name is the email and I'm setting
the password to a random string

newUser = User.objects.create_user(email, email, randomString )
user = auth.authenticate(username=email, password=randomString)
auth.login(request, user)
userProfile = user.get_profile()

This causes an error:
AttributeError("'NoneType' object has no attribute
'_default_manager'",),

I expected an ObjectDoesNotExist exception. It looks like the user
object doesn't exist, but I explicitly test for "user is None"

What is this about?

Thanks,
Ivan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to