#NEWLINE# def migrate_style_settings( ) : #NEWLINE# #INDENT# style_settings = frappe . db . get_singles_dict ( 'Style Settings' ) #NEWLINE# standard_website_theme = frappe . get_doc ( 'Website Theme' , 'Standard' ) #NEWLINE# website_theme = frappe . copy_doc ( standard_website_theme ) #NEWLINE# website_theme . custom = 1 #NEWLINE# website_theme . theme = _ ( 'Custom' ) #NEWLINE# if style_settings : #NEWLINE# #INDENT# map_color_fields ( style_settings , website_theme ) #NEWLINE# map_other_fields ( style_settings , website_theme ) #NEWLINE# #UNINDENT# website_theme . no_sidebar = cint ( frappe . db . get_single_value ( 'Website Settings' , 'no_sidebar' ) ) #NEWLINE# website_theme . save ( ) #NEWLINE# website_theme . use_theme ( )