More robust handling of audit trail event records whose providers are no longer enabled.

This commit is contained in:
Sipke Schoorstra
2014-08-01 12:19:03 -07:00
parent 6f9a137793
commit e36e4e330c

View File

@@ -7,7 +7,7 @@
var eventData = (IDictionary<string, object>) Model.EventData; var eventData = (IDictionary<string, object>) Model.EventData;
var contentTypeName = eventData.Get<string>("ContentTypeName"); var contentTypeName = eventData.Get<string>("ContentTypeName");
var contentPartName = eventData.Get<string>("ContentPartName"); var contentPartName = eventData.Get<string>("ContentPartName");
var diff = (DiffDictionary<string, string>)Model.Diff; var diff = (DiffDictionary<string, string>)Model.Diff ?? new DiffDictionary<string, string>();
} }
<section class="audittrail-contenttype-eventsummary"> <section class="audittrail-contenttype-eventsummary">
@T("Settings for the content part {0} attached to the content type {1} were changed:", Html.ContentPartEditLink(contentPartName), Html.ContentTypeEditLink(contentTypeName)) @T("Settings for the content part {0} attached to the content type {1} were changed:", Html.ContentPartEditLink(contentPartName), Html.ContentTypeEditLink(contentTypeName))