mirror of
https://github.com/navidrome/navidrome.git
synced 2026-04-28 03:19:38 +00:00
fix: only send library association on create when libraryIds is defined
Guard the createUser library association call with libraryIds !== undefined, matching the updateUser pattern. This prevents accidentally clearing backend default library assignments when the form field hasn't been initialized yet.
This commit is contained in:
parent
ef3dddd164
commit
02ef4037df
1 changed files with 1 additions and 1 deletions
|
|
@ -114,7 +114,7 @@ const createUser = async (params) => {
|
||||||
const userId = userResponse.data.id
|
const userId = userResponse.data.id
|
||||||
|
|
||||||
// Then set library associations for non-admin users
|
// Then set library associations for non-admin users
|
||||||
if (!userData.isAdmin) {
|
if (!userData.isAdmin && libraryIds !== undefined) {
|
||||||
await handleUserLibraryAssociation(userId, libraryIds)
|
await handleUserLibraryAssociation(userId, libraryIds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue