Backend: Fix location estimate query

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-06-16 09:54:48 +02:00 committed by Michael Mayer
parent 202b2629dc
commit 2f7c002b4d

View file

@ -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())