Skip to content

Commit

Permalink
home: fix blocked services client schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Jun 30, 2023
1 parent efed237 commit cd6ba61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/home/clientshttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardTeam/AdGuardHome/internal/schedule"
"github.com/AdguardTeam/AdGuardHome/internal/whois"
)

Expand Down Expand Up @@ -118,13 +119,18 @@ func (clients *clientsContainer) jsonToClient(cj clientJSON, prev *Client) (c *C
}
}

weekly := schedule.EmptyWeekly()
if prev != nil {
weekly = prev.BlockedServices.Schedule.Clone()
}

c = &Client{
safeSearchConf: safeSearchConf,

Name: cj.Name,

BlockedServices: &filtering.BlockedServices{
Schedule: prev.BlockedServices.Schedule.Clone(),
Schedule: weekly,
IDs: cj.BlockedServices,
},

Expand Down

0 comments on commit cd6ba61

Please sign in to comment.