# -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe and contributors
# For license information, please see license.txt


import jingrow
from frappe.utils.fixtures import sync_fixtures


def execute():
	sync_fixtures("press")
	domains = frappe.get_all(
		"Site Domain", fields=["site", "domain", "name"], filters={"status": "Active"}
	)

	for domain in domains:
		site_pg = frappe.get_pg("Site", domain.site)
		site_pg.add_domain_to_config(domain.domain)
