From 2f7c002b4d845fb6f5aec9010560bb36c710a45c Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Tue, 16 Jun 2020 09:54:48 +0200 Subject: [PATCH] Backend: Fix location estimate query Signed-off-by: Michael Mayer --- internal/entity/photo_maintain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/entity/photo_maintain.go b/internal/entity/photo_maintain.go index 3a7aaa203..a8e96d527 100644 --- a/internal/entity/photo_maintain.go +++ b/internal/entity/photo_maintain.go @@ -66,7 +66,7 @@ func (m *Photo) EstimatePlace() { } if err := UnscopedDb(). - Where("place_id <> '' AND place_id <> 'zz' AND loc_src <> '' AND loc_src <> ?", SrcEstimate). + Where("place_id <> '' AND place_id <> 'zz' AND location_src <> '' AND location_src <> ?", SrcEstimate). Order(gorm.Expr(dateExpr, m.TakenAt)). Preload("Place").First(&recentPhoto).Error; err != nil { log.Errorf("photo: %s (estimate place)", err.Error())