Skip to content

Commit

Permalink
Fix players not being assigned to the default group after a first pla… (
Browse files Browse the repository at this point in the history
  • Loading branch information
snixtho authored Aug 11, 2024
1 parent 0592ce3 commit 9cb81bd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public Task RemovePlayerFromGroupAsync(long playerId, int groupId) => Table<DbUs

public async Task SetDisplayGroupAsync(long playerId, int groupId)
{
var userGroup = await Table<DbUserGroup>().FirstOrDefaultAsync(ug => ug.GroupId == groupId);
var userGroup = await Table<DbUserGroup>()
.FirstOrDefaultAsync(ug => ug.GroupId == groupId && ug.UserId == playerId);

await using var transaction = await Database.BeginTransactionAsync();

Expand Down

0 comments on commit 9cb81bd

Please sign in to comment.