mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-01 09:48:37 +00:00
Fix blank labels on slot page & blank creator
This commit is contained in:
parent
896795b9a2
commit
841692addb
2 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@
|
|||
<div class="eight wide column">
|
||||
<div class="ui red segment">
|
||||
<h2>Tags</h2>
|
||||
@foreach (string label in Model.Slot.AuthorLabels.Split(","))
|
||||
@foreach (string label in Model.Slot.AuthorLabels.Split(",").Where(label => !string.IsNullOrEmpty(label)))
|
||||
{
|
||||
<div class="ui blue label">@label.Replace("LABEL_", "")</div>
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace LBPUnion.ProjectLighthouse.Pages
|
|||
|
||||
public async Task<IActionResult> 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue