From 162a6a0085558b3b988921f730012490abce286a Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 14 Nov 2023 09:39:39 +0100 Subject: [PATCH] Post merge --- global.json | 4 ++-- .../PropertyEditors/RichTextPropertyIndexValueFactory.cs | 4 ++++ src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj | 1 - .../Umbraco.Core/Services/WebhookRequestServiceTests.cs | 6 +++--- .../Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj | 1 - 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/global.json b/global.json index bf78b4b0a8..17a23f4270 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "7.0.400", + "version": "8.0.100", "rollForward": "latestFeature", - "allowPrerelease": false + "allowPrerelease": true } } diff --git a/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyIndexValueFactory.cs b/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyIndexValueFactory.cs index be49e280cb..a16bdd9fec 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyIndexValueFactory.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyIndexValueFactory.cs @@ -57,6 +57,10 @@ internal class RichTextPropertyIndexValueFactory : NestedPropertyIndexValueFacto public IEnumerable>> GetIndexValues(IProperty property, string? culture, string? segment, bool published) => GetIndexValues(property, culture, segment, published, Enumerable.Empty()); + protected override IContentType? GetContentTypeOfNestedItem(BlockItemData nestedItem, IDictionary contentTypeDictionary) + => contentTypeDictionary.TryGetValue(nestedItem.ContentTypeKey, out var result) ? result : null; + + [Obsolete("Use non-obsolete overload. Scheduled for removal in Umbraco 14.")] protected override IContentType? GetContentTypeOfNestedItem(BlockItemData nestedItem) => _contentTypeService.Get(nestedItem.ContentTypeKey); diff --git a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj index e20071b19e..9b75b889be 100644 --- a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj +++ b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj @@ -29,7 +29,6 @@ - diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/WebhookRequestServiceTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/WebhookRequestServiceTests.cs index 3c41aa5ab2..a4e2ded5df 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/WebhookRequestServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/WebhookRequestServiceTests.cs @@ -19,7 +19,7 @@ public class WebhookRequestServiceTests : UmbracoIntegrationTest public async Task Can_Create_And_Get() { var createdWebhook = await WebhookService.CreateAsync(new Webhook("https://example.com", true, new[] { Guid.NewGuid() }, new[] { Constants.WebhookEvents.Aliases.ContentPublish })); - var created = await WebhookRequestService.CreateAsync(createdWebhook.Key, Constants.WebhookEvents.Aliases.ContentPublish, null); + var created = await WebhookRequestService.CreateAsync(createdWebhook.Result.Key, Constants.WebhookEvents.Aliases.ContentPublish, null); var webhooks = await WebhookRequestService.GetAllAsync(); var webhook = webhooks.First(x => x.Id == created.Id); @@ -38,7 +38,7 @@ public class WebhookRequestServiceTests : UmbracoIntegrationTest { var newRetryCount = 4; var createdWebhook = await WebhookService.CreateAsync(new Webhook("https://example.com", true, new[] { Guid.NewGuid() }, new[] { Constants.WebhookEvents.Aliases.ContentPublish })); - var created = await WebhookRequestService.CreateAsync(createdWebhook.Key, Constants.WebhookEvents.Aliases.ContentPublish, null); + var created = await WebhookRequestService.CreateAsync(createdWebhook.Result.Key, Constants.WebhookEvents.Aliases.ContentPublish, null); created.RetryCount = newRetryCount; await WebhookRequestService.UpdateAsync(created); var webhooks = await WebhookRequestService.GetAllAsync(); @@ -54,7 +54,7 @@ public class WebhookRequestServiceTests : UmbracoIntegrationTest public async Task Can_Delete() { var createdWebhook = await WebhookService.CreateAsync(new Webhook("https://example.com", true, new[] { Guid.NewGuid() }, new[] { Constants.WebhookEvents.Aliases.ContentPublish })); - var created = await WebhookRequestService.CreateAsync(createdWebhook.Key, Constants.WebhookEvents.Aliases.ContentPublish, null); + var created = await WebhookRequestService.CreateAsync(createdWebhook.Result.Key, Constants.WebhookEvents.Aliases.ContentPublish, null); await WebhookRequestService.DeleteAsync(created); var webhooks = await WebhookRequestService.GetAllAsync(); var webhook = webhooks.FirstOrDefault(x => x.Id == created.Id); diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj b/tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj index 392144f4a6..fa49f32f16 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj @@ -6,7 +6,6 @@ -