diff --git a/ProjectLighthouse/Pages/SlotPage.cshtml b/ProjectLighthouse/Pages/SlotPage.cshtml index 75145e55..5faf620d 100644 --- a/ProjectLighthouse/Pages/SlotPage.cshtml +++ b/ProjectLighthouse/Pages/SlotPage.cshtml @@ -31,7 +31,7 @@

Tags

- @foreach (string label in Model.Slot.AuthorLabels.Split(",")) + @foreach (string label in Model.Slot.AuthorLabels.Split(",").Where(label => !string.IsNullOrEmpty(label))) {
@label.Replace("LABEL_", "")
} diff --git a/ProjectLighthouse/Pages/SlotPage.cshtml.cs b/ProjectLighthouse/Pages/SlotPage.cshtml.cs index bd2de3ab..af2bfd60 100644 --- a/ProjectLighthouse/Pages/SlotPage.cshtml.cs +++ b/ProjectLighthouse/Pages/SlotPage.cshtml.cs @@ -17,7 +17,7 @@ namespace LBPUnion.ProjectLighthouse.Pages public async Task OnGet([FromRoute] int id) { - Slot? slot = await this.Database.Slots.FirstOrDefaultAsync(s => s.SlotId == id); + Slot? slot = await this.Database.Slots.Include(s => s.Creator).FirstOrDefaultAsync(s => s.SlotId == id); if (slot == null) return this.NotFound(); this.Slot = slot;