From c95d957d2c346ccfb3181e8adf490e816b8aa8d2 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Wed, 13 Oct 2021 13:51:41 +0530 Subject: [PATCH] refactor: build file and patch --- school/patches.txt | 2 +- school/patches/v0_0/modify_installed_apps_list.py | 11 +++++++++++ .../css/{community.bundle.less => school.bundle.less} | 0 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 school/patches/v0_0/modify_installed_apps_list.py rename school/public/css/{community.bundle.less => school.bundle.less} (100%) diff --git a/school/patches.txt b/school/patches.txt index 8aa860c8..7611e81c 100644 --- a/school/patches.txt +++ b/school/patches.txt @@ -17,4 +17,4 @@ execute:frappe.delete_doc("DocType", "Chapters") #06-10-2021 execute:frappe.delete_doc("DocType", "Lessons") #06-10-2021 execute:frappe.delete_doc("DocType", "Chapter") #06-10-2021 execute:frappe.delete_doc("DocType", "Lesson") #06-10-2021 -execute:frappe.delete_doc("DocType", "LMS Topic") #06-10-2021 +execute:frappe.delete_doc("DocType", "LMS Topic") #06-10-2021 \ No newline at end of file diff --git a/school/patches/v0_0/modify_installed_apps_list.py b/school/patches/v0_0/modify_installed_apps_list.py new file mode 100644 index 00000000..3fdeb2df --- /dev/null +++ b/school/patches/v0_0/modify_installed_apps_list.py @@ -0,0 +1,11 @@ +from __future__ import unicode_literals +import frappe +from frappe.installer import add_to_installed_apps, remove_from_installed_apps + +def execute(): + + if "community" in frappe.db.get_global("installed_apps"): + remove_from_installed_apps("community") + add_to_installed_apps("school") + + diff --git a/school/public/css/community.bundle.less b/school/public/css/school.bundle.less similarity index 100% rename from school/public/css/community.bundle.less rename to school/public/css/school.bundle.less