aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-06-23 18:26:26 +0000
committerMax Magorsch <arzano@gentoo.org>2020-06-23 18:27:04 +0000
commitead9ec7c9c96dbd6bfc6394df783dd213290efda (patch)
tree51ff8b048e4f2bb15fba2c1db24d5626e9b91988 /pkg/app/home/home.go
parentShow Author email if name is not available (diff)
downloadarchives-ead9ec7c9c96dbd6bfc6394df783dd213290efda.tar.gz
archives-ead9ec7c9c96dbd6bfc6394df783dd213290efda.tar.bz2
archives-ead9ec7c9c96dbd6bfc6394df783dd213290efda.zip
Hide messages where the date is null
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'pkg/app/home/home.go')
-rw-r--r--pkg/app/home/home.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/app/home/home.go b/pkg/app/home/home.go
index 478fd21..06bd324 100644
--- a/pkg/app/home/home.go
+++ b/pkg/app/home/home.go
@@ -29,6 +29,7 @@ func ComputeTemplateData() interface{} {
var messages []*models.Message
database.DBCon.Model(&messages).
Where("list = ?", mailingList[0]).
+ Where("not date is null").
Order("date DESC").
Limit(5).
Select()
@@ -62,4 +63,4 @@ func ComputeTemplateData() interface{} {
MessageCount: formatMessageCount(getAllMessagesCount()),
CurrentMonth: time.Now().Format("2006-01"),
}
-} \ No newline at end of file
+}