fix(server): avoid upserting empty metadata array (#25143)

This commit is contained in:
Timon 2026-01-08 22:33:35 +01:00 committed by GitHub
parent 85b0b97ef2
commit 5d1e486478
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -433,7 +433,7 @@ export class AssetMediaService extends BaseService {
originalFileName: dto.filename || file.originalName,
});
if (dto.metadata) {
if (dto.metadata?.length) {
await this.assetRepository.upsertMetadata(asset.id, dto.metadata);
}