import frappe
from frappe.templates.pages.style_settings import default_properties

def execute():
	style_settings = frappe.get_doc("Style Settings", "Style Settings")
	if not style_settings.apply_style:
		style_settings.update(default_properties)
		style_settings.apply_style = 1
		style_settings.save()

import frappe
from frappe.templates.pages.style_settings import default_properties

def execute():
	frappe.reload_doc('website', 'doctype', 'style_settings')
	style_settings = frappe.get_doc("Style Settings", "Style Settings")
	if not style_settings.apply_style:
		style_settings.update(default_properties)
		style_settings.apply_style = 1
		style_settings.save()

Fix default website style patch (reload doc)
[minor] Fix default website style patch (reload doc)
  import frappe
  from frappe.templates.pages.style_settings import default_properties
  
  def execute():
+ 	frappe.reload_doc('website', 'doctype', 'style_settings')
  	style_settings = frappe.get_doc("Style Settings", "Style Settings")
  	if not style_settings.apply_style:
  		style_settings.update(default_properties)
  		style_settings.apply_style = 1
  		style_settings.save()
  
Fix default website style patch (reload doc)
## Code Before:
import frappe
from frappe.templates.pages.style_settings import default_properties

def execute():
	style_settings = frappe.get_doc("Style Settings", "Style Settings")
	if not style_settings.apply_style:
		style_settings.update(default_properties)
		style_settings.apply_style = 1
		style_settings.save()

## Instruction:
Fix default website style patch (reload doc)
## Code After:
import frappe
from frappe.templates.pages.style_settings import default_properties

def execute():
	frappe.reload_doc('website', 'doctype', 'style_settings')
	style_settings = frappe.get_doc("Style Settings", "Style Settings")
	if not style_settings.apply_style:
		style_settings.update(default_properties)
		style_settings.apply_style = 1
		style_settings.save()
