Added encapsulate factory function to get around Django bug #15791

This commit is contained in:
Roberto Rosario
2011-08-05 09:30:26 -04:00
parent 7b0e177ba2
commit 1b7183be85
15 changed files with 57 additions and 37 deletions

View File

@@ -5,6 +5,7 @@ from django.contrib.comments.models import Comment
from navigation.api import register_links, \
register_model_list_columns
from permissions.api import register_permission, set_namespace_title
from common.utils import encapsulate
from documents.models import Document
@@ -34,7 +35,7 @@ register_model_list_columns(Comment, [
},
{
'name': _(u'user'),
'attribute': lambda x: x.user.get_full_name() if x.user.get_full_name() else x.user
'attribute': encapsulate(lambda x: x.user.get_full_name() if x.user.get_full_name() else x.user)
},
{
'name': _(u'comment'),