[profile] removed themes

This commit is contained in:
Rushabh Mehta
2013-06-07 15:09:45 +05:30
parent cbb176cdf1
commit 224ad17b1d
2 changed files with 4 additions and 2 deletions

View File

@@ -3,11 +3,12 @@ import webnotes
def execute():
webnotes.clear_perms("Profile")
webnotes.reload_doc("core", "doctype", "profile")
webnotes.conn.sql("""delete from `tabDefaultValue` where defkey='theme'""")
webnotes.delete_doc("Page", "profile-settings")
return
for name in webnotes.conn.sql("""select name from tabProfile"""):
theme = webnotes.conn.get_default("theme", name[0])
if theme:
webnotes.conn.set_value("Profile", name[0], "theme", theme)
webnotes.conn.sql("""delete from `tabDefaultValue` where defkey='theme'""")
webnotes.delete_doc("Page", "profile-settings")