diff --git a/core/Piranha/Services/Internal/AliasService.cs b/core/Piranha/Services/Internal/AliasService.cs index e92bed4e7..1c9e5e2ec 100644 --- a/core/Piranha/Services/Internal/AliasService.cs +++ b/core/Piranha/Services/Internal/AliasService.cs @@ -260,7 +260,7 @@ private async Task> GetAliasUrls(Guid siteId) { Id = x.Id, AliasUrl = x.AliasUrl - }); + }).ToList(); _cache.Set($"Piranha_AliasUrls_{siteId}", aliasUrls); } diff --git a/test/Piranha.Tests/Services/AliasTests.cs b/test/Piranha.Tests/Services/AliasTests.cs index d9f03f0f9..e614144d4 100644 --- a/test/Piranha.Tests/Services/AliasTests.cs +++ b/test/Piranha.Tests/Services/AliasTests.cs @@ -318,6 +318,8 @@ public async Task Delete() Assert.NotNull(model); + model = await api.Aliases.GetByAliasUrlAsync(ALIAS_4); + await api.Aliases.DeleteAsync(model); } }