import xhiveframework
from xhiveframework.desk.utils import slug


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