fix: improve availablePlayers query to handle undefined playerId

This commit is contained in:
2026-03-31 16:44:48 -07:00
parent 1f9f708f19
commit 48a96ce65f
+1 -1
View File
@@ -37,7 +37,7 @@ export default async function EditUserPage({
where: { where: {
OR: [ OR: [
{ user: null }, { user: null },
{ id: user.playerId || -1 }, // Include the currently associated player if any ...(user.playerId ? [{ id: user.playerId }] : []), // Include the currently associated player if any
], ],
}, },
orderBy: { name: "asc" }, orderBy: { name: "asc" },