From ec9d7d09a173e46d0f75447ba79f5a361280fa21 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 18 Jul 2015 03:57:45 -0400 Subject: [PATCH] Include in context the document for which OCR will be queued. --- mayan/apps/ocr/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mayan/apps/ocr/views.py b/mayan/apps/ocr/views.py index e6efc229ec..487b7c9701 100644 --- a/mayan/apps/ocr/views.py +++ b/mayan/apps/ocr/views.py @@ -23,7 +23,11 @@ from .permissions import ( class DocumentSubmitView(ConfirmView): - extra_context = {'title': _('Submit the selected document for OCR?')} + def get_extra_context(self): + return { + 'object': Document.objects.get(pk=self.kwargs['pk']), + 'title': _('Submit the selected document for OCR?') + } def object_action(self, request, obj): document = obj