mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-28 17:32:44 +08:00
#19227: Fixing caching exceptions when deleting child records
Work Item: 19227 --HG-- branch : 1.x
This commit is contained in:
@@ -62,7 +62,9 @@ namespace Orchard.MediaProcessing.Controllers {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
filter.ImageProfilePartRecord.Filters.Remove(filter);
|
||||
_filterRepository.Delete(filter);
|
||||
|
||||
Services.Notifier.Information(T("Filter deleted"));
|
||||
|
||||
return RedirectToAction("Edit", "Admin", new {id});
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Orchard.Projections.Controllers {
|
||||
}
|
||||
var queryId = group.QueryPartRecord.Id;
|
||||
|
||||
group.QueryPartRecord.FilterGroups.Remove(group);
|
||||
_groupRepository.Delete(group);
|
||||
|
||||
return RedirectToAction("Edit", "Admin", new { id = queryId });
|
||||
@@ -92,7 +93,9 @@ namespace Orchard.Projections.Controllers {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
filter.FilterGroupRecord.Filters.Remove(filter);
|
||||
_repository.Delete(filter);
|
||||
|
||||
Services.Notifier.Information(T("Filter deleted"));
|
||||
|
||||
return RedirectToAction("Edit", "Admin", new { id });
|
||||
|
||||
@@ -61,7 +61,9 @@ namespace Orchard.Projections.Controllers {
|
||||
|
||||
var queryId = layout.QueryPartRecord.Id;
|
||||
|
||||
layout.QueryPartRecord.Layouts.Remove(layout);
|
||||
_repository.Delete(layout);
|
||||
|
||||
Services.Notifier.Information(T("Layout deleted"));
|
||||
|
||||
return RedirectToAction("Edit", "Admin", new { id = queryId });
|
||||
|
||||
@@ -63,7 +63,9 @@ namespace Orchard.Projections.Controllers {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
property.LayoutRecord.Properties.Remove(property);
|
||||
_repository.Delete(property);
|
||||
|
||||
Services.Notifier.Information(T("Property deleted"));
|
||||
|
||||
return RedirectToAction("Edit", "Layout", new { id });
|
||||
|
||||
@@ -61,7 +61,9 @@ namespace Orchard.Projections.Controllers {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
sortCriterion.QueryPartRecord.SortCriteria.Remove(sortCriterion);
|
||||
_repository.Delete(sortCriterion);
|
||||
|
||||
Services.Notifier.Information(T("Sort criteria deleted"));
|
||||
|
||||
return RedirectToAction("Edit", "Admin", new { id });
|
||||
|
||||
Reference in New Issue
Block a user