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[]> {
|
||||
const truncated = dateTrunc(options);
|
||||
|
||||
return this.getBuilder(options)
|
||||
.select(`COUNT(asset.id)::int`, 'count')
|
||||
.addSelect(truncated, 'timeBucket')
|
||||
|
@ -508,6 +507,7 @@ export class AssetRepository implements IAssetRepository {
|
|||
let builder = this.repository
|
||||
.createQueryBuilder('asset')
|
||||
.where('asset.isVisible = true')
|
||||
.andWhere('asset.fileCreatedAt < NOW()')
|
||||
.leftJoinAndSelect('asset.exifInfo', 'exifInfo');
|
||||
|
||||
if (albumId) {
|
||||
|
|
Loading…
Reference in a new issue