Fixed tests

This commit is contained in:
2026-04-19 23:11:17 +02:00
parent 9a2afbfd3b
commit 653b85d28d
2 changed files with 7 additions and 9 deletions

View File

@@ -93,7 +93,6 @@ class PlayerDao extends DatabaseAccessor<AppDatabase> with _$PlayerDaoMixin {
// Get the current nameCount
var nameCount = await calculateNameCount(name: name);
if (nameCount == 0) nameCount++;
// One player with the same name
if (playersWithName.length == 1) {
@@ -108,6 +107,7 @@ class PlayerDao extends DatabaseAccessor<AppDatabase> with _$PlayerDaoMixin {
),
);
} else {
if (nameCount == 0) nameCount++;
// Multiple players with the same name
for (var i = 0; i < playersWithName.length; i++) {
final player = playersWithName[i];