aboutsummaryrefslogtreecommitdiffstats
path: root/account/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'account/views.py')
-rw-r--r--account/views.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/account/views.py b/account/views.py
index 14be14c..1380203 100644
--- a/account/views.py
+++ b/account/views.py
@@ -135,7 +135,11 @@ class ListApprovedView(ListView):
"""
context = super(ListApprovedView, self).get_context_data(**kwargs)
user = self.request.user
- profile = get_object_or_404(UserProfile, user=user)
+ profile_qset = user.userprofile_set.all()
+ if profile_qset:
+ profile = profile_qset[0]
+ else:
+ profile = None
context['user'] = user
context['profile'] = profile
return context