From ab673a9bb95e5ba33dd30bb537dd5f540dd5cf1e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 16 Apr 2020 12:37:53 +0530 Subject: [PATCH] fix(patch): custom and standard scss is separated in theme --- frappe/patches.txt | 1 + frappe/patches/v13_0/website_theme_custom_scss.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 frappe/patches/v13_0/website_theme_custom_scss.py diff --git a/frappe/patches.txt b/frappe/patches.txt index 0e02423639..cbda8cf677 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -272,3 +272,4 @@ execute:frappe.delete_doc_if_exists('DocType', 'GCalendar Account') execute:frappe.delete_doc_if_exists('DocType', 'GCalendar Settings') frappe.patches.v12_0.remove_parent_and_parenttype_from_print_formats execute:from frappe.desk.page.setup_wizard.install_fixtures import update_genders;update_genders() +frappe.patches.v13_0.website_theme_custom_scss diff --git a/frappe/patches/v13_0/website_theme_custom_scss.py b/frappe/patches/v13_0/website_theme_custom_scss.py new file mode 100644 index 0000000000..72c98bfc88 --- /dev/null +++ b/frappe/patches/v13_0/website_theme_custom_scss.py @@ -0,0 +1,9 @@ +import frappe + +def execute(): + for theme in frappe.get_all('Website Theme'): + doc = frappe.get_doc('Website Theme', theme.name) + if not doc.custom_scss and doc.theme_scss: + # move old theme to new theme + doc.custom_scss = doc.theme_scss + doc.save() \ No newline at end of file