

@json_view(permission='view_tender')
def get(self):
    'Tender Document Read'
    if self.request.params.get('download'):
        return get_file(self.request)
    document = self.request.validated['document']
    document_data = document.serialize('view')
    document_data['previousVersions'] = [i.serialize('view') for i in self.request.validated['documents'] if (i.url != document.url)]
    return {
        'data': document_data,
    }

dataset/ETHPy150Open openprocurement/openprocurement.api/src/openprocurement/api/views/tender_document.py TenderDocumentResource.get/original