Error executing template "/Designs/SkanskaMaskin/Paragraph/_form_retur.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Softgear.SkanskaMaskin.Data.Extensions.ProjectInfoExtensions.renderProjectData(ItemType_ProjectInfo self)
   at Softgear.SkanskaMaskin.Data.Entities.Rental.Return.renderReturnForm()
   at CompiledRazorTemplates.Dynamic.RazorEngine_b4e5b5d3ac5648ad98d568a01527754f.Execute() in D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_form_retur.cshtml:line 63
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Softgear.SkanskaMaskin.Data.Business 3 @using Softgear.SkanskaMaskin.Data.Entities.Rental 4 @using Softgear.SkanskaMaskin.Data.Helper 5 6 7 @{ 8 var hbh = new HandleBarsHelper(); 9 10 var customerCenters = CacheManager.GetFromCache<Dynamicweb.Security.UserManagement.UserCollection>(60, "customerCentersGroup4", () => Dynamicweb.Security.UserManagement.User.GetUsersByGroupID(4)); 11 var choose = new Dynamicweb.Security.UserManagement.User(); 12 13 var storeList = (from user in customerCenters.Where(y => y.Active) 14 select new 15 { 16 value = Convert.ToString(user.ID), 17 text = user.Name 18 }).OrderBy(x => x.text).ToList(); 19 20 storeList.Insert(0, new { value = "", text = Translate("Choose_KC", "Välj kundcenter") }); 21 22 var storesData = new 23 { 24 baseUrl = "/service/storeinfo?storeid=", 25 name = "store", 26 required = "required", 27 className = "Control--light", 28 items = storeList.ToArray() 29 }; 30 31 var project = ProjectManager.GetProject(AccountManager.getActiveProjectCode()); 32 var returnForm = new Return(project); 33 } 34 35 <form action="/dashboard/returer/ny" method="get"> 36 <div class="Grid Grid--equalPush"> 37 <div class="Grid-cell"> 38 <div class="Grid Grid--withGutter"> 39 <div class="Grid-cell u-sizeFull"> 40 <div class="Type"> 41 <h2 class="Type-h1">Bekräfta och beställ retur</h2> 42 </div> 43 </div> 44 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 45 Välj kundcenter 46 </div> 47 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 48 @hbh.render("control/index.hbs", storesData) 49 </div> 50 </div> 51 </div> 52 <div class="Grid-cell"> 53 <div class="Grid Grid--withGutter"> 54 <div class="Grid-cell u-sizeFull"> 55 @returnForm.renderSummary() 56 </div> 57 </div> 58 </div> 59 <div class="Grid-cell"> 60 <div class="Grid Grid--withGutter"> 61 <div class="Grid-cell"> 62 <div class="Byline"> 63 @returnForm.renderReturnForm() 64 </div> 65 </div> 66 </div> 67 </div> 68 <div class="Grid-cell"> 69 <div class="Grid Grid--withGutter"> 70 <div class="Grid-cell u-sizeFull"> 71 <div class="Type"> 72 <h3 class="Type-h3">Övrig information</h3> 73 </div> 74 </div> 75 <div class="Grid-cell u-sizeFull"> 76 <div class="Input Input--fill"> 77 <label for="return-message" class="Input-label">Meddelande</label> 78 <textarea id="return-message" class="Input-textarea js-formInputField" name="return-message" data-controller="form-input" rows="3" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 97px;"> </textarea> 79 </div> 80 </div> 81 </div> 82 </div> 83 <input type="hidden" name="project" value="58460"> 84 <div class="Grid-cell"> 85 <div class="Grid Grid--withGutter"> 86 <div class="Grid-cell u-size1of2 u-textLeft"> 87 <button class="Button Button--tertiary js-overlayClose" type="submit">Avbryt</button> 88 </div> 89 <div class="Grid-cell u-size1of2 u-textRight"> 90 <button class="Button" type="submit">Beställ retur</button> 91 </div> 92 </div> 93 </div> 94 </div> 95 </form>