From a054ddaee0df76b76cf75eb935790d45fb6dba7a Mon Sep 17 00:00:00 2001 From: rootdarkarchon Date: Wed, 14 Dec 2022 17:40:48 +0100 Subject: [PATCH] potentially fix group migration --- MareSynchronosServer/MareSynchronosServices/CleanupService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MareSynchronosServer/MareSynchronosServices/CleanupService.cs b/MareSynchronosServer/MareSynchronosServices/CleanupService.cs index 102e402..97164f9 100644 --- a/MareSynchronosServer/MareSynchronosServices/CleanupService.cs +++ b/MareSynchronosServer/MareSynchronosServices/CleanupService.cs @@ -158,7 +158,7 @@ public class CleanupService : IHostedService, IDisposable if (ownerHasLeft) { - var groupPairs = await dbContext.GroupPairs.Where(g => g.GroupGID == userGroupPair.GroupGID).ToListAsync().ConfigureAwait(false); + var groupPairs = await dbContext.GroupPairs.Where(g => g.GroupGID == userGroupPair.GroupGID && g.GroupUserUID != user.UID).ToListAsync().ConfigureAwait(false); if (!groupPairs.Any()) {