mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
selectAccountDataByType shouldn't error when no rows (#804)
Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
parent
9a56cf8439
commit
e959927d0a
1 changed files with 4 additions and 0 deletions
|
@ -125,6 +125,10 @@ func (s *accountDataStatements) selectAccountDataByType(
|
||||||
var content []byte
|
var content []byte
|
||||||
|
|
||||||
if err = stmt.QueryRowContext(ctx, localpart, roomID, dataType).Scan(&content); err != nil {
|
if err = stmt.QueryRowContext(ctx, localpart, roomID, dataType).Scan(&content); err != nil {
|
||||||
|
if err == sql.ErrNoRows {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue