prozorro_sale.jobber.models.mixins
# TODO: remove this function when nested digitalSignature will be implemented
self.ensure_owner_permission(context)
if self.status != 'deleted':
raise errors.ForbiddenStatusError(self._obj_type, self.status)
if doc.documentType != 'digitalSignature':
raise errors.DataError({'documentType': f'Cannot upload doc with documentType {doc.documentType}'})
cancellation = self.cancellations[cancellation_id]
cancellation.documents[doc.id] = doc
return {'id': doc.id}