Prevent unnecessary join

This commit is contained in:
Stefan Berg
2022-08-15 15:42:51 +02:00
parent 149a67fd6f
commit 991921f188

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