fix: person thumbnail generation on edited assets (#26112)

* fix: person thumbnail generation on edited assets

* chore: sql sync
This commit is contained in:
Brandon Wees
2026-02-10 11:38:43 -06:00
committed by GitHub
parent 90d554947f
commit 8c8b11f80c
3 changed files with 71 additions and 1 deletions

View File

@@ -176,6 +176,7 @@ select
where
"asset_file"."assetId" = "asset"."id"
and "asset_file"."type" = 'preview'
and "asset_file"."isEdited" = $1
) as "previewPath"
from
"person"
@@ -183,7 +184,7 @@ from
inner join "asset" on "asset_face"."assetId" = "asset"."id"
left join "asset_exif" on "asset_exif"."assetId" = "asset"."id"
where
"person"."id" = $1
"person"."id" = $2
and "asset_face"."deletedAt" is null
-- PersonRepository.reassignFace

View File

@@ -288,6 +288,7 @@ export class PersonRepository {
.select('asset_file.path')
.whereRef('asset_file.assetId', '=', 'asset.id')
.where('asset_file.type', '=', sql.lit(AssetFileType.Preview))
.where('asset_file.isEdited', '=', false)
.as('previewPath'),
)
.where('person.id', '=', id)