From eba0b1d8967c64c9756783bca36ace2481c5fe59 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 14 May 2020 22:49:01 +0200 Subject: [PATCH] Backend: Fix search query (photo:true filter) Signed-off-by: Michael Mayer --- internal/query/photos.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/query/photos.go b/internal/query/photos.go index ed4e92d37..b9cffd05f 100644 --- a/internal/query/photos.go +++ b/internal/query/photos.go @@ -59,7 +59,7 @@ func Photos(f form.PhotoSearch) (results PhotosResults, count int, err error) { if f.Video { s = s.Where("(files.file_type = 'jpg' OR files.file_video = 1) AND photos.photo_video = 1") } else if f.Photo { - s = s.Where("files.file_type = 'jpg' AND photos.photo_video = 1") + s = s.Where("files.file_type = 'jpg' AND photos.photo_video = 0") } else { s = s.Where("(files.file_type = 'jpg' OR files.file_video = 1)") }