

@login_manager.user_loader
def load_user(userid):
    session = settings.Session()
    user = session.query(models.User).filter((models.User.id == userid)).first()
    session.expunge_all()
    session.commit()
    session.close()
    return DefaultUser(user)

dataset/ETHPy150Open airbnb/airflow/airflow/default_login.py load_user/original