diff --git a/apps/templates/_user_profile.html b/apps/templates/_user_profile.html
index d47ba6537..04a146496 100644
--- a/apps/templates/_user_profile.html
+++ b/apps/templates/_user_profile.html
@@ -11,7 +11,7 @@
{{ user.name }}
- {{ user.get_role_display | default:_('User') }}
+ {{ user.get_role_display | default:{% trans 'User' %} }}
diff --git a/apps/users/views.py b/apps/users/views.py
index 19245b5f8..2b2ed441d 100644
--- a/apps/users/views.py
+++ b/apps/users/views.py
@@ -116,8 +116,7 @@ class UserDetailView(AdminUserRequiredMixin, DetailView):
context_object_name = "user"
def get_context_data(self, **kwargs):
- groups = [
- group for group in UserGroup.objects.iterator() if group not in self.object.groups.iterator()]
+ groups = [group for group in UserGroup.objects.iterator() if group not in self.object.groups.iterator()]
context = {'app': _('Users'), 'action': _('User detail'), 'groups': groups}
kwargs.update(context)
return super(UserDetailView, self).get_context_data(**kwargs)