Skip to content

Commit

Permalink
home: fix blocked services
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Jun 10, 2024
1 parent 1085d59 commit 46f793b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/home/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardTeam/AdGuardHome/internal/querylog"
"github.com/AdguardTeam/AdGuardHome/internal/schedule"
"github.com/AdguardTeam/AdGuardHome/internal/whois"
"github.com/AdguardTeam/dnsproxy/proxy"
"github.com/AdguardTeam/dnsproxy/upstream"
Expand Down Expand Up @@ -261,6 +262,12 @@ func (o *clientObject) toPersistent(
}
}

if o.BlockedServices == nil {
o.BlockedServices = &filtering.BlockedServices{
Schedule: &schedule.Weekly{},
}
}

err = o.BlockedServices.Validate()
if err != nil {
return nil, fmt.Errorf("init blocked services %q: %w", cli.Name, err)
Expand Down

0 comments on commit 46f793b

Please sign in to comment.