mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 01:13:10 -06:00
Fix create filter API
This commit is contained in:
parent
bdc44c4bde
commit
6a4b7a3792
|
|
@ -92,11 +92,11 @@ func (s *filterStatements) insertFilter(
|
|||
// Check if filter already exists in the database
|
||||
err = s.selectFilterIDByContentStmt.QueryRowContext(ctx,
|
||||
localpart, filterJSON).Scan(&existingFilterID)
|
||||
if err != nil {
|
||||
if err != nil && err != sql.ErrNoRows {
|
||||
return "", err
|
||||
}
|
||||
// If it does, return the existing ID
|
||||
if len(existingFilterID) != 0 {
|
||||
if existingFilterID != "" {
|
||||
return existingFilterID, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue