summaryrefslogtreecommitdiff
path: root/internal/db/bundb/instance.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/instance.go')
-rw-r--r--internal/db/bundb/instance.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/db/bundb/instance.go b/internal/db/bundb/instance.go
index 4fa898639..95f6ad5b8 100644
--- a/internal/db/bundb/instance.go
+++ b/internal/db/bundb/instance.go
@@ -39,8 +39,9 @@ func (i *instanceDB) CountInstanceUsers(ctx context.Context, domain string) (int
Where("? IS NULL", bun.Ident("account.suspended_at"))
if domain == config.GetHost() || domain == config.GetAccountDomain() {
- // if the domain is *this* domain, just count where the domain field is null
- q = q.WhereGroup(" AND ", whereEmptyOrNull("account.domain"))
+ // If the domain is *this* domain, just
+ // count where the domain field is null.
+ q = q.Where("? IS NULL", bun.Ident("account.domain"))
} else {
q = q.Where("? = ?", bun.Ident("account.domain"), domain)
}