mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 09:15:44 +03:00
fix(server): server stats showing wrong quota usage (#10036)
* Add filter to exclude external libraries from the user quota usage * Add filter to exclude external libraries from the user quota usage * fix sql syntax
This commit is contained in:
@@ -130,7 +130,13 @@ SELECT
|
||||
"assets"."type" = 'VIDEO'
|
||||
AND "assets"."isVisible"
|
||||
) AS "videos",
|
||||
COALESCE(SUM("exif"."fileSizeInByte"), 0) AS "usage"
|
||||
COALESCE(
|
||||
SUM("exif"."fileSizeInByte") FILTER (
|
||||
WHERE
|
||||
"assets"."libraryId" IS NULL
|
||||
),
|
||||
0
|
||||
) AS "usage"
|
||||
FROM
|
||||
"users" "users"
|
||||
LEFT JOIN "assets" "assets" ON "assets"."ownerId" = "users"."id"
|
||||
|
||||
Reference in New Issue
Block a user