mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 17:46:15 -06:00
Fix possible issue on db.ErrNoEntries AND non-zero query count
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
This commit is contained in:
parent
9d8faa490b
commit
57ccbb9e38
1 changed files with 3 additions and 1 deletions
|
|
@ -34,8 +34,10 @@ func (conn *dbConn) Exists(ctx context.Context, query *bun.SelectQuery) (bool, d
|
|||
|
||||
// Process error as our own and check if it exists
|
||||
switch err := conn.ProcessError(err); err {
|
||||
case nil, db.ErrNoEntries:
|
||||
case nil:
|
||||
return (count != 0), nil
|
||||
case db.ErrNoEntries:
|
||||
return false, nil
|
||||
default:
|
||||
return false, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue