The code that will handle your arguments can read in the time key by using either request.data.get('time') or request.data['time']. By calling request.data.get('time'), the application will continue to run if the language key doesn’t exist in the URL. In that case, the result of the method will be None. So you need t = request.data.get('time') if t: pass Source: digitalocean.com
@app.route('/schedule/<int:adv_id>', methods=['POST']) def schedule(adv_id):request.data.get('time')orrequest.data['time']. By callingrequest.data.get('time'), the application will continue to run if the language key doesn’t exist in the URL. In that case, the result of the method will beNone. So you needt = request.data.get('time') if t: passSource: digitalocean.com