From d96d0f4a72fc8189adea8a4211d6ff513b19b39b Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 11 Oct 2022 14:21:48 +0100 Subject: [PATCH] Don't yell if no rows affected on deletion --- syncapi/storage/postgres/relations_table.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syncapi/storage/postgres/relations_table.go b/syncapi/storage/postgres/relations_table.go index 5ed8059fb..87064ed7c 100644 --- a/syncapi/storage/postgres/relations_table.go +++ b/syncapi/storage/postgres/relations_table.go @@ -109,6 +109,9 @@ func (s *relationsStatements) DeleteRelation( _, err := stmt.ExecContext( ctx, roomID, childEventID, ) + if err == sql.ErrNoRows { + return nil + } return err }