From 4588ca61863dae0f8792c47d0172284ebf4ef140 Mon Sep 17 00:00:00 2001 From: Glenn Wilkinson Date: Fri, 17 Jul 2020 18:14:56 +0100 Subject: [PATCH] Removed database debug statements --- models/reported.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/reported.go b/models/reported.go index 09e693cf..c996b3cf 100644 --- a/models/reported.go +++ b/models/reported.go @@ -57,7 +57,7 @@ func GetReportedEmailAttachment(uid, id int64) (ReportedAttachment, error) { att := ReportedAttachment{} - err := db.Debug().Table("reported_attachments").Select("reported_attachments.filename, reported_attachments.header, reported_attachments.content").Joins("left join reported on reported.id = reported_attachments.rid").Where("reported.user_id=? AND reported_attachments.id=?", uid, id).Take(&att).Error + err := db.Table("reported_attachments").Select("reported_attachments.filename, reported_attachments.header, reported_attachments.content").Joins("left join reported on reported.id = reported_attachments.rid").Where("reported.user_id=? AND reported_attachments.id=?", uid, id).Take(&att).Error return att, err } @@ -71,7 +71,7 @@ func GetReportedEmails(uid, emailid, limit, offset int64) ([]*ReportedEmail, err // We have three conditions; fetch all email, fetch one email by id, or fetch a subset of emails by limit and offset if emailid == -1 { if offset == -1 { - err = db.Debug().Preload("Attachments").Where("user_id=?", uid).Find(&ems).Error + err = db.Preload("Attachments").Where("user_id=?", uid).Find(&ems).Error } else { err = db.Preload("Attachments").Where("user_id=?", uid).Order("ReportedTime", true).Offset(offset).Limit(limit).Find(&ems).Error }