Answers for "sqlalchemy flask: AttributeError: 'Session' object has no attribute '_model_changes' on session.commit()"

0

sqlalchemy flask: AttributeError: 'Session' object has no attribute '_model_changes' on session.commit()

def create_session(config):
    engine = create_engine(config['DATABASE_URI'])
    Session = sessionmaker(bind=engine)
    session = Session()
    session._model_changes = {}
    return session
Posted by: Guest on June-29-2021
0

sqlalchemy flask: AttributeError: 'Session' object has no attribute '_model_changes' on session.commit()

def create_session(config):
    engine = create_engine(config['DATABASE_URI'])
    Session = sessionmaker(bind=engine)
    session = Session()
    session._model_changes = {}
    return session
Posted by: Guest on June-29-2021

Code answers related to "sqlalchemy flask: AttributeError: 'Session' object has no attribute '_model_changes' on session.commit()"

Python Answers by Framework

Browse Popular Code Answers by Language