def validate_tender_data(request):
    update_logging_context(request, {'tender_id': '__new__'})

    data = validate_json_data(request)
    if data is None:
        return

    model = request.tender_from_data(data, create=False)
    if not request.check_accreditation(model.create_accreditation):
        request.errors.add('procurementMethodType', 'accreditation', 'Broker Accreditation level does not permit tender creation')
        request.errors.status = 403
        return
    data = validate_data(request, model, data=data)
    if data and model.procuring_entity_kinds not in data.get('procuringEntity', {}).get('kind', ''):
        request.errors.add('procuringEntity',
                           'kind',
                           '{kind!r} procuringEntity cannot publish this type of procedure. '
                           'Only {kinds} are allowed.'.format(kind=data.get('procuringEntity', {}).get('kind', ''), kinds=', '.join(model.procuring_entity_kinds)))
        request.errors.status = 403
dataset/ETHPy150Open openprocurement/openprocurement.api/src/openprocurement/api/validation.py/validate_tender_data/swapped operands of `not in`