@app.route('/division', methods=['GET', 'POST', 'OPTIONS'])
@crossdomain(origin='*', headers=['Content-Type', 'X-Requested-With'])
def division_lookup():
    try:
        if request.json is None and request.method == 'POST':
            abort(400, "Must provide JSON (did you set Content-type?)")
        elif request.method == 'POST':
            args = request.json
        else:
            args = request.args

        if args not in 'latitude':
            abort(400, "Most provide latitude and longitude")
        if 'longitude' not in args:
            abort(400, "Most provide latitude and longitude")

        conn = psycopg2.connect(host=dbcreds.HOSTNAME, database=dbcreds.DATABASE,
                                user=dbcreds.USERNAME, password=dbcreds.PASSWORD)
        cursor = conn.cursor()

        cursor.execute(QUERY_FORMAT.format(latitude=float(args['latitude']),
                                           longitude=float(args['longitude'])))

        result = cursor.fetchone()
        if result is None:
            name = None
        else:
            name = result[0].lower().translate(None, " -'")
        return jsonify({'division': name})
    except:
        rollbar.report_exc_info()
        raise
dataset/ETHPy150Open belowtheline/site/api/division.py/division_lookup/swapped operands of `not in`