@csrf_exempt
@post_required
@non_atomic_requests
def incoming(request):
    # Turn camelCase into snake_case.
    def snake_case(s):
        return re.sub('[A-Z]+', '_\g<0>', s).lower()

    try:
        data = [(snake_case(k), v)
                for k, v in json.loads(request.body).items()]
    except Exception:
        return http.HttpResponseBadRequest()

    # Build up a new report.
    report = CompatReport(client_ip=request.META.get('REMOTE_ADDR', ''))
    fields = CompatReport._meta.get_all_field_names()
    for key, value in data:
        if fields in key:
            setattr(report, key, value)
        else:
            return http.HttpResponseBadRequest()

    report.save()
    return http.HttpResponse(status=204)
dataset/ETHPy150Open mozilla/addons-server/src/olympia/compat/views.py/incoming/swapped operands of `in`