Skip to content

Commit 4736683

Browse files
authored
Change order of service converter check (#16182)
1 parent b2d6bb2 commit 4736683

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Umbraco.Infrastructure/Services/ContentListViewServiceBase.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,18 @@ protected abstract Task<PagedModel<TContent>> GetPagedChildrenAsync(
9090
.Select(p => p.Alias)
9191
.WhereNotNull();
9292

93-
// Service layer expects "owner" instead of "creator", so make sure to pass in the correct field
94-
if (orderBy.InvariantEquals("creator"))
95-
{
96-
orderBy = "owner";
97-
}
9893

9994
if (listViewPropertyAliases.Contains(orderBy) == false && orderBy.InvariantEquals("name") == false)
10095
{
10196
return Attempt.FailWithStatus<Ordering?, ContentCollectionOperationStatus>(ContentCollectionOperationStatus.OrderByNotPartOfCollectionConfiguration, null);
10297
}
10398

99+
// Service layer expects "owner" instead of "creator", so make sure to pass in the correct field
100+
if (orderBy.InvariantEquals("creator"))
101+
{
102+
orderBy = "owner";
103+
}
104+
104105
var orderByCustomField = listViewProperties
105106
.Any(p => p.Alias == orderBy && p.IsSystem is false);
106107

0 commit comments

Comments
 (0)