Few more NRT tweaks (#12323)
* Amended GetAll() on IDataTypeService to return an empty collection rather than null. * Added a ClearSessionValue method to ISessionManager (given you can no longer set a value to null). * Allow for null values in a StatefulNotification. * Removed obsoletion of synchronous messages on TreeControllerBase. * Fixed further CS8620 warnings in core project. * Further fix to nullable warning. * Aligned nullablility of retreiving tree nodes and menus, synchronously or asynchronously (such that we no longer can get null values, always empty collection objects).
This commit is contained in:
@@ -424,8 +424,8 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
[Authorize(Policy = AuthorizationPolicies.SectionAccessForDataTypeReading)]
|
||||
public IEnumerable<DataTypeBasic>? GetAll()
|
||||
{
|
||||
return _dataTypeService?
|
||||
.GetAll()?
|
||||
return _dataTypeService
|
||||
.GetAll()
|
||||
.Select(_umbracoMapper.Map<IDataType, DataTypeBasic>).WhereNotNull().Where(x => x.IsSystemDataType == false);
|
||||
}
|
||||
|
||||
@@ -439,8 +439,8 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
[Authorize(Policy = AuthorizationPolicies.SectionAccessForDataTypeReading)]
|
||||
public IDictionary<string, IEnumerable<DataTypeBasic>>? GetGroupedDataTypes()
|
||||
{
|
||||
var dataTypes = _dataTypeService?
|
||||
.GetAll()?
|
||||
var dataTypes = _dataTypeService
|
||||
.GetAll()
|
||||
.Select(_umbracoMapper.Map<IDataType, DataTypeBasic>)
|
||||
.ToArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user