diff --git a/patches/june_2013/p02_update_project_completed.py b/patches/june_2013/p02_update_project_completed.py index dff1f331fa8..27eb1d00631 100644 --- a/patches/june_2013/p02_update_project_completed.py +++ b/patches/june_2013/p02_update_project_completed.py @@ -1,5 +1,6 @@ import webnotes def execute(): + webnotes.reload_doc("project", "doctype", "project") for p in webnotes.conn.sql_list("""select name from tabProject"""): webnotes.bean("Project", p).controller.update_percent_complete() \ No newline at end of file diff --git a/patches/november_2012/add_theme_to_profile.py b/patches/november_2012/add_theme_to_profile.py index 648c1d15004..89710a4c711 100644 --- a/patches/november_2012/add_theme_to_profile.py +++ b/patches/november_2012/add_theme_to_profile.py @@ -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") \ No newline at end of file