Merge pull request #9 from isbeorn/main

Prevent unnecessary left join
This commit is contained in:
rootdarkarchon
2022-08-15 17:56:48 +02:00
committed by GitHub

View File

@@ -117,8 +117,8 @@ namespace MareSynchronosServer.Hubs
var otherEntries = await query.ToListAsync();
await Clients.Users(otherEntries).SendAsync(Api.OnUserRemoveOnlinePairedPlayer, user.CharacterIdentification);
_dbContext.RemoveRange(_dbContext.Files.Where(f => !f.Uploaded && f.Uploader.UID == user.UID));
_dbContext.RemoveRange(_dbContext.Files.Where(f => !f.Uploaded && f.UploaderUID == user.UID));
user.CharacterIdentification = null;
await _dbContext.SaveChangesAsync();