From 7692df4b2906126abaed99018bb902748f896723 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 8 May 2017 20:10:55 +0200 Subject: [PATCH] Fix search --- service/torrent/torrent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/torrent/torrent.go b/service/torrent/torrent.go index 876d09da..6f729d28 100644 --- a/service/torrent/torrent.go +++ b/service/torrent/torrent.go @@ -55,10 +55,10 @@ func GetTorrentById(id string) (model.Torrents, error) { func GetTorrentsOrderBy(parameters *WhereParams, orderBy string, limit int, offset int) ([]model.Torrents, int) { var torrents []model.Torrents var count int - conditions := "" + conditions := "1" // FIXME if strings.HasPrefix(orderBy, "filesize") { // torrents w/ NULL filesize fuck up the sorting on postgres - conditions = "filesize IS NOT NULL" + conditions += " AND filesize IS NOT NULL" } var params []interface{}