user = web.ctx.db.select('role', where="verify_email_token='" + path + "'")
for data in user:
with web.ctx.db.transaction():
web.ctx.db.update('role', where="verify_email_token ='" + path + "'", verify_email_token = '', email=data.new_email)
web.ctx.session.alerts.append('email_verified')
raise web.seeother("/", absolute = True)
The issue here is that the table is not being updated for some reason. I think that is must be the SELECT statement which does not allow to update the table afterwards.
When I just use the UPDATE statement the table does update. I need it so the email column updates with the data in new_email column.