I am able to insert records into the database:
new_user = Users(new_register_email, new_password, verification_code)
db.session.add(new_user)
db.session.commit()
I am able to query records inserted out of the database:
user_to_verify = Users.query.filter_by(email=uid).first()
I am not able to update records:
user_to_verify = Users.query.filter_by(email=uid).first()
if user_to_verify:
if user_to_verify.verification_code == returned_verification_code:
user_to_verify.verified = True
db.session.commit()
With debugging I am verifying that the code listed above is run but the verified field in the database is not updated. This is fallowing info here https://www.tutorialspoint.com/sqlalchemy/sqlalchemy_orm_updating_objects.htm
UPDATE:
image of debugger at point where update should occure