mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 23:48:27 +00:00
Remove uneccessary logging, null checking
This commit is contained in:
parent
62d47cfc75
commit
cd607d7b3b
1 changed files with 5 additions and 4 deletions
|
@ -130,15 +130,16 @@ func (s *accountsStatements) selectAccountByLocalpart(
|
|||
stmt := s.selectAccountByLocalpartStmt
|
||||
err := stmt.QueryRowContext(ctx, localpart).Scan(&localpartPtr, &appserviceIDPtr)
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Unable to retrieve user from the db")
|
||||
switch err {
|
||||
case sql.ErrNoRows:
|
||||
default:
|
||||
log.WithError(err).Error("Unable to retrieve user from the db")
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
if appserviceIDPtr.Valid {
|
||||
acc.AppServiceID = appserviceIDPtr.String
|
||||
}
|
||||
if localpartPtr.Valid {
|
||||
acc.Localpart = localpartPtr.String
|
||||
}
|
||||
|
||||
acc.UserID = userutil.MakeUserID(localpart, s.serverName)
|
||||
acc.ServerName = s.serverName
|
||||
|
|
Loading…
Reference in a new issue