umbraco/Umbraco-CMS — pull request #379 by ma1f (2014-05-15 04:42:49+00:00)
Title: solves issue U4-2356 when deleting templates

yeah, you need to update cmsDocument based on the templateId