From e352be14ea6d1025bb6d8de8bd17c64f1b7de3a5 Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Date: Mon, 6 May 2024 13:38:29 +0200 Subject: [PATCH] Change order of service converter check (#16182) --- .../Services/ContentListViewServiceBase.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Infrastructure/Services/ContentListViewServiceBase.cs b/src/Umbraco.Infrastructure/Services/ContentListViewServiceBase.cs index 829854e8f0..2d7794d5aa 100644 --- a/src/Umbraco.Infrastructure/Services/ContentListViewServiceBase.cs +++ b/src/Umbraco.Infrastructure/Services/ContentListViewServiceBase.cs @@ -90,17 +90,18 @@ internal abstract class ContentListViewServiceBase 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(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);