Commit e8e3c46b authored by Michal Čihař's avatar Michal Čihař

Do not fail on user without profile

parent 04d0f76e
......@@ -32,7 +32,7 @@ from django.contrib.auth.models import User
from django.views.generic import TemplateView
from urllib import urlencode
from accounts.models import set_lang
from accounts.models import set_lang, Profile
from trans.models import Change, Project
from accounts.forms import (
ProfileForm, SubscriptionForm, UserForm, ContactForm
......@@ -179,7 +179,7 @@ def user_page(request, user):
User details page.
'''
user = get_object_or_404(User, username=user)
profile = user.get_profile()
profile = get_object_or_404(Profile, user=user)
# Projects user is allowed to see
acl_projects = Project.objects.all_acl(request.user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment