From f8548543cd890242c98a759698e6668dec53fc2e Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 11 Jan 2021 14:10:55 +1100 Subject: [PATCH] Fixes another async/sync issue --- .../Controllers/SectionController.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.BackOffice/Controllers/SectionController.cs b/src/Umbraco.Web.BackOffice/Controllers/SectionController.cs index 097b5a3310..f3c0415b75 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/SectionController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/SectionController.cs @@ -1,5 +1,6 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Infrastructure; using Umbraco.Core; @@ -49,7 +50,7 @@ namespace Umbraco.Web.BackOffice.Controllers _actionDescriptorCollectionProvider = actionDescriptorCollectionProvider; } - public IEnumerable
GetSections() + public async Task> GetSections() { var sections = _sectionService.GetAllowedSections(_backofficeSecurityAccessor.BackOfficeSecurity.GetUserId().ResultOr(0)); @@ -74,7 +75,7 @@ namespace Umbraco.Web.BackOffice.Controllers if (hasDashboards) continue; // get the first tree in the section and get its root node route path - var sectionRoot = appTreeController.GetApplicationTrees(section.Alias, null, null).Result; + var sectionRoot = await appTreeController.GetApplicationTrees(section.Alias, null, null); section.RoutePath = GetRoutePathForFirstTree(sectionRoot); }