From 7a3f84b49ed9503c6a983498c3d58a67bb0c78c0 Mon Sep 17 00:00:00 2001 From: Hipposgrumm Date: Sun, 28 Dec 2025 22:20:26 -0700 Subject: [PATCH] Fixed an issue where not being in a group would cause an error --- src/Controllers/Common/GroupController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controllers/Common/GroupController.cs b/src/Controllers/Common/GroupController.cs index 533c95f..ebf834a 100644 --- a/src/Controllers/Common/GroupController.cs +++ b/src/Controllers/Common/GroupController.cs @@ -300,6 +300,7 @@ public class GroupController : Controller { if (request.ForUserID != null) { Viking? target = ctx.Vikings.FirstOrDefault(v => request.ForUserID.ToUpper() == v.Uid.ToString()); if (target == null) return Ok(new GetGroupsResult { Success = false }); + if (target.GroupMembership?.Group == null) return Ok(new GetGroupsResult { Success = true }); groups = [target.GroupMembership.Group]; } else { groups = groups.Where(g => g.Type == GroupType.Public || g.Type == GroupType.MembersOnly);