import json

import jingrow


def execute():
	"""Handle introduction of UI tours"""
	completed = {}
	for tour in jingrow.get_all("Form Tour", {"ui_tour": 1}, pluck="name"):
		completed[tour] = {"is_complete": True}

	User = jingrow.qb.PageType("User")
	jingrow.qb.update(User).set("onboarding_status", json.dumps(completed)).run()
