From 7019c9433be9d9fc3fe662e3a6cc967df36c5485 Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 23 Feb 2018 16:40:29 +1000 Subject: [PATCH] U4-10991 TourController Object reference not set to an instance of an object - when loading an invalid tour --- src/Umbraco.Web/Models/BackOfficeTour.cs | 5 +++++ src/Umbraco.Web/Models/BackOfficeTourFile.cs | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/BackOfficeTour.cs b/src/Umbraco.Web/Models/BackOfficeTour.cs index 78a4cd1897..268d5667f4 100644 --- a/src/Umbraco.Web/Models/BackOfficeTour.cs +++ b/src/Umbraco.Web/Models/BackOfficeTour.cs @@ -9,6 +9,11 @@ namespace Umbraco.Web.Models [DataContract(Name = "tour", Namespace = "")] public class BackOfficeTour { + public BackOfficeTour() + { + RequiredSections = new List(); + } + [DataMember(Name = "name")] public string Name { get; set; } [DataMember(Name = "alias")] diff --git a/src/Umbraco.Web/Models/BackOfficeTourFile.cs b/src/Umbraco.Web/Models/BackOfficeTourFile.cs index 7291a89ff4..6840171f48 100644 --- a/src/Umbraco.Web/Models/BackOfficeTourFile.cs +++ b/src/Umbraco.Web/Models/BackOfficeTourFile.cs @@ -9,6 +9,11 @@ namespace Umbraco.Web.Models [DataContract(Name = "tourFile", Namespace = "")] public class BackOfficeTourFile { + public BackOfficeTourFile() + { + Tours = new List(); + } + /// /// The file name for the tour /// @@ -27,4 +32,4 @@ namespace Umbraco.Web.Models [DataMember(Name = "tours")] public IEnumerable Tours { get; set; } } -} \ No newline at end of file +}