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
commit dbaf45ba70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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();