bug 564354, we check master as a fallback if we have no associated django_user.

This commit is contained in:
Dave Dash 2010-05-07 14:50:03 -07:00
Родитель 180ada371d
Коммит 0afd9b62bf
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -39,8 +39,13 @@ class SessionBackend:
session.delete()
return None
# User will hit this if they are new to zamboni.
if profile.user is None:
profile.create_django_user()
# This will catch replication lags in case we created a user.
profile = UserProfile.objects.using('default').no_cache().get(
pk=user_id)
if profile.user is None:
profile.create_django_user()
return profile.user