mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 03:22:24 -05:00
fix public timeline bug (#150)
This commit is contained in:
parent
2dc9fc1626
commit
ddc120d5e6
18 changed files with 162 additions and 79 deletions
|
|
@ -97,7 +97,7 @@ func (a *adminDB) NewSignup(ctx context.Context, username string, reason string,
|
|||
err = a.conn.NewSelect().
|
||||
Model(acct).
|
||||
Where("username = ?", username).
|
||||
Where("? IS NULL", bun.Ident("domain")).
|
||||
WhereGroup(" AND ", whereEmptyOrNull("domain")).
|
||||
Scan(ctx)
|
||||
if err != nil {
|
||||
// we just don't have an account yet create one
|
||||
|
|
@ -181,7 +181,7 @@ func (a *adminDB) CreateInstanceAccount(ctx context.Context) db.Error {
|
|||
NewSelect().
|
||||
Model(>smodel.Account{}).
|
||||
Where("username = ?", username).
|
||||
Where("? IS NULL", bun.Ident("domain"))
|
||||
WhereGroup(" AND ", whereEmptyOrNull("domain"))
|
||||
count, err := existsQ.Count(ctx)
|
||||
if err != nil && count == 1 {
|
||||
a.log.Infof("instance account %s already exists", username)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue