mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(filters): store and update with no external filters (#1049)
* fix(filters): store and update * fix(filters): bad fmt var * fix(filters): store expect status * fix(filters): store expect status * fix(filters): external filter always rejected
This commit is contained in:
parent
0fa53b0b2e
commit
3e244fac10
14 changed files with 151 additions and 125 deletions
|
@ -260,12 +260,12 @@ func (r *IrcRepo) CheckExistingNetwork(ctx context.Context, network *domain.IrcN
|
|||
var tls sql.NullBool
|
||||
|
||||
if err = row.Scan(&net.ID, &net.Enabled, &net.Name, &net.Server, &net.Port, &tls, &pass, &nick, &net.Auth.Mechanism, &account, &password, &inviteCmd, &bouncerAddr, &net.UseBouncer); err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
// no result is not an error in our case
|
||||
return nil, nil
|
||||
} else {
|
||||
return nil, errors.Wrap(err, "error scanning row")
|
||||
}
|
||||
|
||||
return nil, errors.Wrap(err, "error scanning row")
|
||||
}
|
||||
|
||||
net.TLS = tls.Bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue