diff --git a/internal/home/clients.go b/internal/home/clients.go index 4f3870ec9f3..85f30c0e5cd 100644 --- a/internal/home/clients.go +++ b/internal/home/clients.go @@ -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" @@ -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)