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:
parent
311261bd4e
commit
607fd39130
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user