Skip to content

Commit

Permalink
Relation names constantes
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJump committed Oct 4, 2023
1 parent 5830d43 commit 7ba4d20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions uSync.Core/Serialization/Serializers/ContentSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ protected override uSyncChange HandleTrashedState(IContent item, bool trashed, G
// should restore it (as long as we do a move!)


var restoreParentId = GetRelationParentId(item, restoreParentKey, Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias);
var restoreParentId = GetRelationParentId(item, restoreParentKey, Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias);
contentService.Move(item, restoreParentId);

// clean out any relations for this item (some versions of Umbraco don't do this on a Move)
CleanRelations(item, Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias);
CleanRelations(item, Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias);

return uSyncChange.Update("Restored", item.Name, "Recycle Bin", restoreParentKey.ToString());

Expand All @@ -374,7 +374,7 @@ protected override uSyncChange HandleTrashedState(IContent item, bool trashed, G
if (item.ParentId > Constants.System.RecycleBinContent)
{
// clean any relations that may be there (stops an error)
CleanRelations(item, Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias);
CleanRelations(item, Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias);

// move to the recycle bin
contentService.MoveToRecycleBin(item);
Expand Down

0 comments on commit 7ba4d20

Please sign in to comment.