import xhiveframework


def execute():
	xhiveframework.reload_doc("website", "doctype", "web_page_view", force=True)
	site_url = xhiveframework.utils.get_site_url(xhiveframework.local.site)
	xhiveframework.db.sql(f"""UPDATE `tabWeb Page View` set is_unique=1 where referrer LIKE '%{site_url}%'""")
