# Copyright (c) 2020, JINGROW
# For license information, please see license.txt


import jingrow


def execute():
	jingrow.reload_pg("jcloud", "pagetype", "site")
	jingrow.reload_pg("jcloud", "pagetype", "site_domain")
	for site in jingrow.db.get_all("Site", {"status": ("!=", "Archived")}, pluck="name"):
		jingrow.get_pg("Site", site)._create_default_site_domain()
