diff --git a/apps/document_indexing/views.py b/apps/document_indexing/views.py index b36b2f23e0..d74342d49d 100644 --- a/apps/document_indexing/views.py +++ b/apps/document_indexing/views.py @@ -8,6 +8,7 @@ from django.utils.safestring import mark_safe from permissions.api import check_permissions from documents.literals import PERMISSION_DOCUMENT_VIEW from documents.models import Document +from common.utils import encapsulate from document_indexing import PERMISSION_DOCUMENT_INDEXING_VIEW, \ PERMISSION_DOCUMENT_INDEXING_REBUILD_INDEXES @@ -45,7 +46,7 @@ def index_instance_list(request, index_id=None): 'extra_columns_preffixed': [ { 'name': _(u'item'), - 'attribute': lambda x: index_instance_item_link(x) + 'attribute': encapsulate(lambda x: index_instance_item_link(x)) } ], 'title': title, diff --git a/apps/documents/views.py b/apps/documents/views.py index 182d05a87e..0d2fe0350e 100644 --- a/apps/documents/views.py +++ b/apps/documents/views.py @@ -332,7 +332,7 @@ def document_page_transformation_list(request, document_page_id): 'list_object_variable_name': 'transformation', 'extra_columns': [ {'name': _(u'order'), 'attribute': 'order'}, - {'name': _(u'transformation'), 'attribute': lambda x: x.get_transformation_display()}, + {'name': _(u'transformation'), 'attribute': encapsulate(lambda x: x.get_transformation_display())}, {'name': _(u'arguments'), 'attribute': 'arguments'} ], 'hide_link': True, diff --git a/apps/ocr/views.py b/apps/ocr/views.py index 932325667b..4c21381a9e 100644 --- a/apps/ocr/views.py +++ b/apps/ocr/views.py @@ -339,7 +339,7 @@ def setup_queue_transformation_list(request, document_queue_id): 'list_object_variable_name': 'transformation', 'extra_columns': [ {'name': _(u'order'), 'attribute': 'order'}, - {'name': _(u'transformation'), 'attribute': lambda x: x.get_transformation_display()}, + {'name': _(u'transformation'), 'attribute': encapsulate(lambda x: x.get_transformation_display())}, {'name': _(u'arguments'), 'attribute': 'arguments'} ], 'hide_link': True,