From 35e433d75331b53f14cc6bbd978bb1e91f0fd947 Mon Sep 17 00:00:00 2001 From: Yader Velasquez Date: Fri, 9 Feb 2024 13:44:18 -0600 Subject: [PATCH] Prevent blank titles base_url to be displayed as popular links --- api/loaders/loaders.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/loaders/loaders.go b/api/loaders/loaders.go index 43357f3..4596b33 100644 --- a/api/loaders/loaders.go +++ b/api/loaders/loaders.go @@ -33,6 +33,8 @@ func getPopularLinks(ctx context.Context) func(key []string) ([][]*models.BaseUR errors := make([]error, 1) opts := &database.FilterOptions{ Filter: sq.And{ + // We are preventing blank title links to be public_ready, but just in case + sq.NotEq{"b.title": ""}, sq.Eq{"b.public_ready": true}, sq.Gt{"b.counter": 0}, }, -- 2.45.2