fix: fix psql issue in user page; fix tiny psql error when selecting by empty list

This commit is contained in:
dr-carrot
2024-11-25 15:40:32 -05:00
parent 2fc8996606
commit 3d0166aaef
2 changed files with 5 additions and 1 deletions

View File

@@ -43,6 +43,10 @@ class Media {
finalIds = tmdbIds;
}
if (finalIds.length === 0) {
return [];
}
const media = await mediaRepository
.createQueryBuilder('media')
.leftJoinAndSelect(

View File

@@ -45,7 +45,7 @@ router.get('/', async (req, res, next) => {
`CASE WHEN (user.username IS NULL OR user.username = '') THEN (
CASE WHEN (user.plexUsername IS NULL OR user.plexUsername = '') THEN (
CASE WHEN (user.jellyfinUsername IS NULL OR user.jellyfinUsername = '') THEN
user.email
"user"."email"
ELSE
LOWER(user.jellyfinUsername)
END)