jcloude/press/patches/v0_0_1/set_domain_in_site.py
2025-12-23 19:23:49 +08:00

14 lines
358 B
Python

# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
import frappe
def execute():
frappe.reload_pg("press", "doctype", "site")
domain = frappe.db.get_single_value("Press Settings", "domain")
frappe.db.sql(
"UPDATE tabSite SET domain = %s WHERE IFNULL(domain, '') = ''", (domain,)
)