From 84653c9293fa133283d4f5f0188ac27fae8e31a0 Mon Sep 17 00:00:00 2001 From: jvyden Date: Fri, 29 Oct 2021 15:10:34 -0400 Subject: [PATCH] Fix SUser exception on slot not found --- ProjectLighthouse/Controllers/SlotsController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ProjectLighthouse/Controllers/SlotsController.cs b/ProjectLighthouse/Controllers/SlotsController.cs index 4e8b89fd..0d4764db 100644 --- a/ProjectLighthouse/Controllers/SlotsController.cs +++ b/ProjectLighthouse/Controllers/SlotsController.cs @@ -34,6 +34,8 @@ namespace LBPUnion.ProjectLighthouse.Controllers { .Include(s => s.Location) .FirstOrDefaultAsync(s => s.SlotId == id); + if(slot == null) return this.NotFound(); + return this.Ok(slot.Serialize()); } }