Change order of service converter check (#16182)
This commit is contained in:
committed by
Nikolaj Geisle
parent
73646a88b1
commit
e352be14ea
@@ -90,17 +90,18 @@ internal abstract class ContentListViewServiceBase<TContent, TContentType, TCont
|
||||
.Select(p => p.Alias)
|
||||
.WhereNotNull();
|
||||
|
||||
// Service layer expects "owner" instead of "creator", so make sure to pass in the correct field
|
||||
if (orderBy.InvariantEquals("creator"))
|
||||
{
|
||||
orderBy = "owner";
|
||||
}
|
||||
|
||||
if (listViewPropertyAliases.Contains(orderBy) == false && orderBy.InvariantEquals("name") == false)
|
||||
{
|
||||
return Attempt.FailWithStatus<Ordering?, ContentCollectionOperationStatus>(ContentCollectionOperationStatus.OrderByNotPartOfCollectionConfiguration, null);
|
||||
}
|
||||
|
||||
// Service layer expects "owner" instead of "creator", so make sure to pass in the correct field
|
||||
if (orderBy.InvariantEquals("creator"))
|
||||
{
|
||||
orderBy = "owner";
|
||||
}
|
||||
|
||||
var orderByCustomField = listViewProperties
|
||||
.Any(p => p.Alias == orderBy && p.IsSystem is false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user