Skip to content

Commit a60a722

Browse files
committed
fix
1 parent 3e3316f commit a60a722

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

models/user/user.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,10 +835,7 @@ type CountUserFilter struct {
835835
// It performs a much more efficient check than counting all users.
836836
func HasUsers(ctx context.Context) (bool, error) {
837837
sess := db.GetEngine(ctx)
838-
cond := builder.NewCond()
839-
cond = cond.And(builder.Eq{"type": UserTypeIndividual})
840-
841-
exists, err := sess.Where(cond).Limit(1).Exist(new(User))
838+
exists, err := sess.Exist(new(User))
842839
if err != nil {
843840
return false, fmt.Errorf("error checking user existence: %w", err)
844841
}

0 commit comments

Comments
 (0)