From 269915d77b029c9df45ae2705c73e2521357e113 Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Thu, 14 May 2020 15:05:59 +0200 Subject: [PATCH] Backend: Remove unnecessary group in photos.go --- internal/query/photos.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/query/photos.go b/internal/query/photos.go index ffb9d31d8..35d95b161 100644 --- a/internal/query/photos.go +++ b/internal/query/photos.go @@ -33,11 +33,10 @@ func Photos(f form.PhotoSearch) (results PhotosResults, count int, err error) { cameras.camera_make, cameras.camera_model, lenses.lens_make, lenses.lens_model, places.loc_label, places.loc_city, places.loc_state, places.loc_country`). - Joins("JOIN files ON files.photo_id = photos.id AND files.file_missing = 0 AND files.deleted_at IS NULL AND (files.file_type = 'jpg' OR files.file_video)"). - Joins("JOIN cameras ON cameras.id = photos.camera_id"). - Joins("JOIN lenses ON lenses.id = photos.lens_id"). - Joins("JOIN places ON photos.place_id = places.id"). - Group("photos.id, files.id") + Joins("JOIN files ON photos.id = files.photo_id AND files.file_missing = 0 AND files.deleted_at IS NULL AND (files.file_type = 'jpg' OR files.file_video)"). + Joins("JOIN cameras ON photos.camera_id = cameras.id"). + Joins("JOIN lenses ON photos.lens_id = lenses.id"). + Joins("JOIN places ON photos.place_id = places.id") if f.ID != "" { s = s.Where("photos.photo_uuid = ?", f.ID)