home: fix blocked services
This commit is contained in:
parent
1085d59a65
commit
46f793b259
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue