aboutsummaryrefslogtreecommitdiff
path: root/roomserver
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-10-01 10:55:00 +0100
committerGitHub <noreply@github.com>2020-10-01 10:55:00 +0100
commit91fc1f1c92d06d875b2e6293ac8d352716bdfb20 (patch)
treee1130dae26ed92915f9a88e61a127cbfda494ada /roomserver
parentfed3ebd2f14c70364f45128b387efe1ff9a5ee2f (diff)
Fix bug in error handling in SQLite InsertPreviousEvent (#1456)
Diffstat (limited to 'roomserver')
-rw-r--r--roomserver/storage/sqlite3/previous_events_table.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/roomserver/storage/sqlite3/previous_events_table.go b/roomserver/storage/sqlite3/previous_events_table.go
index 222b53b9..aaee6273 100644
--- a/roomserver/storage/sqlite3/previous_events_table.go
+++ b/roomserver/storage/sqlite3/previous_events_table.go
@@ -98,7 +98,7 @@ func (s *previousEventStatements) InsertPreviousEvent(
eventNIDAsString := fmt.Sprintf("%d", eventNID)
selectStmt := sqlutil.TxStmt(txn, s.selectPreviousEventExistsStmt)
err := selectStmt.QueryRowContext(ctx, previousEventID, previousEventReferenceSHA256).Scan(&eventNIDs)
- if err != sql.ErrNoRows {
+ if err != nil && err != sql.ErrNoRows {
return fmt.Errorf("selectStmt.QueryRowContext.Scan: %w", err)
}
var nids []string