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.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/internal/db/bundb/account.go b/internal/db/bundb/account.go
index 32a70f7cd..745e41567 100644
--- a/internal/db/bundb/account.go
+++ b/internal/db/bundb/account.go
@@ -22,7 +22,6 @@ import (
"context"
"errors"
"fmt"
- "strings"
"time"
"github.com/superseriousbusiness/gotosocial/internal/cache"
@@ -103,16 +102,15 @@ func (a *accountDB) getAccount(ctx context.Context, cacheGet func() (*gtsmodel.A
}
func (a *accountDB) UpdateAccount(ctx context.Context, account *gtsmodel.Account) (*gtsmodel.Account, db.Error) {
- if strings.TrimSpace(account.ID) == "" {
- // TODO: we should not need this check here
- return nil, errors.New("account had no ID")
- }
-
- // Update the account's last-used
+ // Update the account's last-updated
account.UpdatedAt = time.Now()
// Update the account model in the DB
- _, err := a.conn.NewUpdate().Model(account).WherePK().Exec(ctx)
+ _, err := a.conn.
+ NewUpdate().
+ Model(account).
+ WherePK().
+ Exec(ctx)
if err != nil {
return nil, a.conn.ProcessError(err)
}