def get_generated_document(self): document_id = self.request.get('document-id') if not document_id: raise NotFound document = GeneratedProtocol.get(document_id) if not document: raise NotFound return document