seitime-frappe/frappe/patches/v4_0/webnotes_to_frappe.py

12 lines
352 B
Python

from __future__ import unicode_literals
import frappe, json
def execute():
frappe.clear_cache()
installed = frappe.get_installed_apps()
if "webnotes" in installed:
installed.remove("webnotes")
if "frappe" not in installed:
installed = ["frappe"] + installed
frappe.db.set_global("installed_apps", json.dumps(installed))
frappe.clear_cache()