Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
fix issue with db list returning 1 element when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dstpierre committed Aug 22, 2021
1 parent a920a91 commit 58303b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (b *Base) List(auth internal.Auth, db *mongo.Database, col string, params L
}

if len(results) == 0 {
results = make([]bson.M, 1)
results = make([]bson.M, 0)
}

result.Results = results
Expand Down

0 comments on commit 58303b5

Please sign in to comment.