Don't show missing files in search results by default

This commit is contained in:
Michael Mayer 2018-09-27 09:44:06 +02:00
parent 10859ee695
commit 340d9ea799

View file

@ -107,7 +107,7 @@ func (s *Search) Photos(form PhotoSearchForm) ([]PhotoSearchResult, error) {
Joins("LEFT JOIN locations ON locations.id = photos.location_id"). Joins("LEFT JOIN locations ON locations.id = photos.location_id").
Joins("LEFT JOIN photo_tags ON photo_tags.photo_id = photos.id"). Joins("LEFT JOIN photo_tags ON photo_tags.photo_id = photos.id").
Joins("LEFT JOIN tags ON photo_tags.tag_id = tags.id"). Joins("LEFT JOIN tags ON photo_tags.tag_id = tags.id").
Where("photos.deleted_at IS NULL"). Where("photos.deleted_at IS NULL AND photos.file_missing = 0").
Group("photos.id, files.id") Group("photos.id, files.id")
if form.Query != "" { if form.Query != "" {