import influxframework


def execute():
	doctype = "Top Bar Item"
	if not influxframework.db.table_exists(doctype) or not influxframework.db.has_column(doctype, "target"):
		return

	influxframework.reload_doc("website", "doctype", "top_bar_item")
	influxframework.db.set_value(doctype, {"target": 'target = "_blank"'}, "open_in_new_tab", 1)
