Flask-session TypeError: ‘<=' not supported between instances of 'NoneType' and 'datetime.datetime'

Solution
app.config['SESSION_PERMANENT'] = True