1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix(server): only calculate quota usage for internal assets (#6556)

only calculate usage for internal assets
This commit is contained in:
Daniel Dietzler 2024-01-21 22:48:29 +01:00 committed by GitHub
parent 311261bd4e
commit 607fd39130
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -121,7 +121,7 @@ export class UserRepository implements IUserRepository {
.createQueryBuilder('assets')
.select('COALESCE(SUM(exif."fileSizeInByte"), 0)')
.leftJoin('assets.exifInfo', 'exif')
.where('assets.ownerId = users.id')
.where('assets.ownerId = users.id AND NOT assets.isExternal')
.withDeleted();
const query = this.userRepository

View File

@ -162,6 +162,7 @@ SET
LEFT JOIN "exif" "exif" ON "exif"."assetId" = "assets"."id"
WHERE
"assets"."ownerId" = users.id
AND NOT "assets"."isExternal"
),
"updatedAt" = CURRENT_TIMESTAMP
WHERE