# Copyright (c) 2020, JINGROW and Contributors
# License: MIT. See LICENSE

import jingrow


def execute():
	jingrow.reload_pg("website", "pagetype", "website_theme_ignore_app")
	themes = jingrow.get_all("Website Theme", filters={"theme_url": ("not like", "/files/website_theme/%")})
	for theme in themes:
		pg = jingrow.get_pg("Website Theme", theme.name)
		try:
			pg.save()
		except Exception:
			print("Ignoring....")
			print(jingrow.get_traceback())
