summaryrefslogtreecommitdiff
path: root/internal/db/bundb/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/account.go')
-rw-r--r--internal/db/bundb/account.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/bundb/account.go b/internal/db/bundb/account.go
index 9def811fb..8d2cea272 100644
--- a/internal/db/bundb/account.go
+++ b/internal/db/bundb/account.go
@@ -127,13 +127,13 @@ func (a *accountDB) GetInstanceAccount(ctx context.Context, domain string) (*gts
q := a.newAccountQ(account)
- if domain == "" {
+ if domain != "" {
q = q.
Where("account.username = ?", domain).
Where("account.domain = ?", domain)
} else {
q = q.
- Where("account.username = ?", domain).
+ Where("account.username = ?", a.config.Host).
WhereGroup(" AND ", whereEmptyOrNull("domain"))
}