def execute():
	for user in frappe.get_all("User"):
		username = user["name"]
		bookmarks = frappe.db.get_default("_bookmarks", username)

		if not bookmarks:
			continue

		if isinstance(bookmarks, basestring):
			bookmarks = json.loads(bookmarks)

		for opts in bookmarks:
			route = (opts.get("route") or "").strip("#/ ")

			if route and route.startswith("Form"):
				try:
					view, doctype, docname = opts["route"].split("/")
				except __HOLE__:
					continue

				if frappe.db.exists(doctype, docname):
					if (doctype=="DocType"
						or int(frappe.db.get_value("DocType", doctype, "issingle") or 0)
						or not frappe.db.table_exists(doctype)):
						continue
					_toggle_like(doctype, docname, add="Yes", user=username)
dataset/ETHPy150Open frappe/frappe/frappe/patches/v5_0/bookmarks_to_stars.py/execute