python – The route in Flask redirecting twice

@app.route('/customers_products/<name>',methods=('GET','POST'))
def customers_products(name):
    ##pass
        return redirect(url_for('customer_payment',name=name))
    return render_template('customers_products.html',name=name,products=products)

@app.route('/customer_payment/<name>',methods=('GET','POST'))
def customer_payment(name):
    order_numbers = (i for i in range(101,400))
    cursor = mysql.connection.cursor()
    query = 'SELECT order_no FROM order_receipts'
    cursor.execute(query)
    numbers = cursor.fetchall()

    numbers_used = ()
    for number in numbers:
        numbers_used.append(number(0))
        order_numbers.remove(number(0))

            
            
    order_num = random.randint(order_numbers(1),order_numbers(-1))
    print('Number 1:',order_num)
    print('Number 2:',order_num)

    ##pass

Output

Number 1: 168
Number 2: 168
127.0.0.1 - - (07/Apr/2021 23:14:39) "(37mGET /customer_payment/<name> HTTP/1.1(0m" 200 -
Number 1: 326
Number 2: 326
127.0.0.1 - - (07/Apr/2021 23:14:39) "(37mGET /customer_payment/<name> HTTP/1.1(0m" 200 -

I had a problem that although I only used redirect for one time then the route customer_payment redirected twice and I could not find out where is the problem that the result is not the same as I expected.