summaryrefslogtreecommitdiff
path: root/internal/db/bundb/conn.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/conn.go')
-rw-r--r--internal/db/bundb/conn.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/db/bundb/conn.go b/internal/db/bundb/conn.go
index 3b5a3ac92..baa0baeae 100644
--- a/internal/db/bundb/conn.go
+++ b/internal/db/bundb/conn.go
@@ -68,13 +68,12 @@ func (conn *DBConn) ProcessError(err error) db.Error {
// Exists checks the results of a SelectQuery for the existence of the data in question, masking ErrNoEntries errors
func (conn *DBConn) Exists(ctx context.Context, query *bun.SelectQuery) (bool, db.Error) {
- // Get the select query result
- count, err := query.Count(ctx)
+ exists, err := query.Exists(ctx)
// Process error as our own and check if it exists
switch err := conn.ProcessError(err); err {
case nil:
- return (count != 0), nil
+ return exists, nil
case db.ErrNoEntries:
return false, nil
default: