@json_view(validators=(validate_file_update,), permission='edit_tender')
    def put(self):
        if self.request.validated['tender_status'] in ['complete', 'cancelled', 'unsuccessful']:
            self.request.errors.add('body', 'data', 'Can\'t update document in current ({}) tender status'.format(self.request.validated['tender_status']))
            self.request.errors.status = 403
            return
        document = upload_file(self.request)
        self.request.validated['cancellation'].documents.append(document)
        if save_tender(self.request):
            self.LOGGER.info('Updated tender cancellation document {}'.format(self.request.context.id),
                        extra=context_unpack(self.request, {'MESSAGE_ID': 'tender_cancellation_document_put'}))
            return {'data': document.serialize("view")}
Daemonizes the `command` function.
dataset/ETHPy150Open openprocurement/openprocurement.api/src/openprocurement/api/views/cancellation_document.py/TenderCancellationDocumentResource.put--crossover with--dataset/ETHPy150Open facebook/sparts/sparts/daemon.py/daemonize