mirror of
https://github.com/navidrome/navidrome.git
synced 2026-04-26 10:30:46 +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
|
||||
|
||||
// Then set library associations for non-admin users
|
||||
if (!userData.isAdmin) {
|
||||
if (!userData.isAdmin && libraryIds !== undefined) {
|
||||
await handleUserLibraryAssociation(userId, libraryIds)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue