# Copyright (c) 2020, Jingrow Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt


import jingrow


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