mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05:00
fix(server): avoid getting timebucket in the future (#4540)
This commit is contained in:
parent
2ec63f7914
commit
cfec6a8fdb
1 changed files with 1 additions and 1 deletions
|
@ -480,7 +480,6 @@ export class AssetRepository implements IAssetRepository {
|
||||||
|
|
||||||
getTimeBuckets(options: TimeBucketOptions): Promise<TimeBucketItem[]> {
|
getTimeBuckets(options: TimeBucketOptions): Promise<TimeBucketItem[]> {
|
||||||
const truncated = dateTrunc(options);
|
const truncated = dateTrunc(options);
|
||||||
|
|
||||||
return this.getBuilder(options)
|
return this.getBuilder(options)
|
||||||
.select(`COUNT(asset.id)::int`, 'count')
|
.select(`COUNT(asset.id)::int`, 'count')
|
||||||
.addSelect(truncated, 'timeBucket')
|
.addSelect(truncated, 'timeBucket')
|
||||||
|
@ -508,6 +507,7 @@ export class AssetRepository implements IAssetRepository {
|
||||||
let builder = this.repository
|
let builder = this.repository
|
||||||
.createQueryBuilder('asset')
|
.createQueryBuilder('asset')
|
||||||
.where('asset.isVisible = true')
|
.where('asset.isVisible = true')
|
||||||
|
.andWhere('asset.fileCreatedAt < NOW()')
|
||||||
.leftJoinAndSelect('asset.exifInfo', 'exifInfo');
|
.leftJoinAndSelect('asset.exifInfo', 'exifInfo');
|
||||||
|
|
||||||
if (albumId) {
|
if (albumId) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue