Skip to content

Commit

Permalink
Update dbMigration for old main library ids
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Jul 16, 2023
1 parent 0829237 commit 2afd0e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/utils/migrations/dbMigration.js
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ async function handleOldUsers(ctx) {
// Convert old library ids to new library ids
if (user.librariesAccessible?.length) {
user.librariesAccessible = user.librariesAccessible.map(lid => {
if (!lid.startsWith('lib_')) return lid // Already not an old library id so dont change
if (!lid.startsWith('lib_') && lid !== 'main') return lid // Already not an old library id so dont change
hasUpdates = true
return oldDbIdMap.libraries[lid]
}).filter(lid => lid)
Expand Down

0 comments on commit 2afd0e2

Please sign in to comment.