Merge pull request #2010 from umbraco/temp-U4-10035

Turns out when we empty the recycle bin we weren't removing associate…
This commit is contained in:
Sebastiaan Janssen
2017-06-21 11:51:47 +02:00
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -636,9 +636,12 @@ namespace Umbraco.Core.Persistence.Repositories
{
//In order to update the ContentVersion we need to retrieve its primary key id
var contentVerDto = Database.SingleOrDefault<ContentVersionDto>("WHERE VersionId = @Version", new { Version = entity.Version });
contentVersionDto.Id = contentVerDto.Id;
Database.Update(contentVersionDto);
if (contentVerDto != null)
{
contentVersionDto.Id = contentVerDto.Id;
Database.Update(contentVersionDto);
}
Database.Update(dto);
}

View File

@@ -42,6 +42,7 @@ namespace Umbraco.Core.Persistence.Repositories
//Construct and execute delete statements for all trashed items by 'nodeObjectType'
var deletes = new List<string>
{
FormatDeleteStatement("cmsTask", "nodeId"),
FormatDeleteStatement("umbracoUser2NodeNotify", "nodeId"),
FormatDeleteStatement("umbracoUser2NodePermission", "nodeId"),
@"DELETE FROM umbracoAccessRule WHERE umbracoAccessRule.accessId IN (