diff --git a/e2e/src/api/specs/timeline.e2e-spec.ts b/e2e/src/api/specs/timeline.e2e-spec.ts index 6ba6c7df45..28bb8f977b 100644 --- a/e2e/src/api/specs/timeline.e2e-spec.ts +++ b/e2e/src/api/specs/timeline.e2e-spec.ts @@ -149,24 +149,21 @@ describe('/timeline', () => { expect(status).toBe(200); expect(body).toEqual({ - bucketAssets: { - city: [], - country: [], - duration: [], - id: [], - isArchived: [], - isFavorite: [], - isImage: [], - isTrashed: [], - livePhotoVideoId: [], - localDateTime: [], - ownerId: [], - projectionType: [], - ratio: [], - status: [], - thumbhash: [], - }, - hasNextPage: false, + city: [], + country: [], + duration: [], + id: [], + isArchived: [], + isFavorite: [], + isImage: [], + isTrashed: [], + livePhotoVideoId: [], + localDateTime: [], + ownerId: [], + projectionType: [], + ratio: [], + status: [], + thumbhash: [], }); }); @@ -189,25 +186,21 @@ describe('/timeline', () => { expect(status).toBe(200); expect(body).toEqual({ - bucketAssets: { - city: [], - country: [], - duration: [], - id: [], - isArchived: [], - isFavorite: [], - isImage: [], - isTrashed: [], - isVideo: [], - livePhotoVideoId: [], - localDateTime: [], - ownerId: [], - projectionType: [], - ratio: [], - status: [], - thumbhash: [], - }, - hasNextPage: false, + city: [], + country: [], + duration: [], + id: [], + isArchived: [], + isFavorite: [], + isImage: [], + isTrashed: [], + livePhotoVideoId: [], + localDateTime: [], + ownerId: [], + projectionType: [], + ratio: [], + status: [], + thumbhash: [], }); }); }); diff --git a/server/src/repositories/asset.repository.ts b/server/src/repositories/asset.repository.ts index 2a8bdd9ed4..4b134dcf9c 100644 --- a/server/src/repositories/asset.repository.ts +++ b/server/src/repositories/asset.repository.ts @@ -610,12 +610,12 @@ export class AssetRepository { eb .case() .when(sql`exif."exifImageHeight" = 0 or exif."exifImageWidth" = 0`) - .then(eb.lit(1.0)) + .then(eb.lit(1)) .when('exif.orientation', 'in', sql`('5', '6', '7', '8', '-90', '90')`) .then(sql`round(exif."exifImageHeight"::numeric / exif."exifImageWidth"::numeric, 3)`) .else(sql`round(exif."exifImageWidth"::numeric / exif."exifImageHeight"::numeric, 3)`) .end(), - eb.lit(1.0), + eb.lit(1), ) .as('ratio'), ])