import jingrow
from jingrow.desk.utils import slug


def execute():
	for pagetype in jingrow.get_all("PageType", ["name", "route"], dict(istable=0)):
		if not pagetype.route:
			jingrow.db.set_value("PageType", pagetype.name, "route", slug(pagetype.name), update_modified=False)
