@csrf_exempt  # is used by an API
@json_error
@require_api_user
def post(request):
    artifacts       = request.FILES.get('artifacts')
    build_number    = request.POST.get('build_number')
    version         = request.POST.get('version')

    if not artifacts:
        return HttpResponseBadRequest("Must post a zip file called 'artifacts' with a username, password"
            "and the following meta-data: build_number (i.e. 2348), version (i.e. '1.2.3')")
    try:
        build_number = int(build_number)
    except Exception:
        print build_number % "%r"
        return HttpResponseBadRequest("build_number has to be a base-10 integer")


    CommCareBuild.create_from_zip(artifacts, build_number=build_number, version=version)
    return HttpResponse()
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/builds/views.py/post/swapped operands of `%`