From 5c5d0dad91fedc00f53c93fadc5ef6aa57d24a1e Mon Sep 17 00:00:00 2001 From: nzdev <834725+nzdev@users.noreply.github.com> Date: Sun, 17 Jan 2021 14:12:47 +1300 Subject: [PATCH] Pass int to Umbraco.Content instead of int? given we know _contentId has value. --- src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs index 168da455e3d1..d0b95aafa930 100644 --- a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs +++ b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs @@ -103,7 +103,7 @@ protected virtual void ConfigurePublishedContentRequest(PublishedRequest request { if (_contentId.HasValue) { - var content = Umbraco.Content(_contentId); + var content = Umbraco.Content(_contentId.Value); if (content == null) { throw new InvalidOperationException("Could not resolve content with id " + _contentId);