flask sqlalchemy error binding parameter 1 probably unsupported type

Solution
room.created_by = new_user.id
@app.route('/user', methods=['POST'])
def add_users():
    if request.method == 'POST':
        name = request.json['name']
        email = request.json['email']
        phone_no = request.json['phone_no']
        city = request.json['city']

        new_user = Users(name=name, email=email, phone_no=phone_no, city=city)
        room = Room(r_name='hello')
        new_user.rooms.append(room)
        db.session.add(new_user)
        db.session.commit()

        return jsonify({'message': 'successfully created user'})