Added db.session.commit