diff options
| author | 2021-08-26 11:28:16 +0200 | |
|---|---|---|
| committer | 2021-08-26 11:28:16 +0200 | |
| commit | ddc120d5e6e0f18f235a6b5bbe5ceec86efedc41 (patch) | |
| tree | 08869fd4514e7ba67c57e81e001df0e1c329414c /internal/db/bundb/account.go | |
| parent | Pg to bun (#148) (diff) | |
| download | gotosocial-ddc120d5e6e0f18f235a6b5bbe5ceec86efedc41.tar.xz | |
fix public timeline bug (#150)
Diffstat (limited to 'internal/db/bundb/account.go')
| -rw-r--r-- | internal/db/bundb/account.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/bundb/account.go b/internal/db/bundb/account.go index 7ebb79a15..c96d0df9e 100644 --- a/internal/db/bundb/account.go +++ b/internal/db/bundb/account.go @@ -110,7 +110,7 @@ func (a *accountDB) GetInstanceAccount(ctx context.Context, domain string) (*gts } else { q = q. Where("account.username = ?", domain). - Where("? IS NULL", bun.Ident("domain")) + WhereGroup(" AND ", whereEmptyOrNull("domain")) } err := processErrorResponse(q.Scan(ctx)) @@ -172,7 +172,7 @@ func (a *accountDB) GetLocalAccountByUsername(ctx context.Context, username stri q := a.newAccountQ(account). Where("username = ?", username). - Where("? IS NULL", bun.Ident("domain")) + WhereGroup(" AND ", whereEmptyOrNull("domain")) err := processErrorResponse(q.Scan(ctx)) @@ -218,7 +218,7 @@ func (a *accountDB) GetAccountStatuses(ctx context.Context, accountID string, li } if excludeReplies { - q = q.Where("? IS NULL", bun.Ident("in_reply_to_id")) + q = q.WhereGroup(" AND ", whereEmptyOrNull("in_reply_to_id")) } if pinnedOnly { |
