Pull request: home: fix 8 to 9 migration
Updates #2988. Squashed commit of the following: commit 1b9f145be0dbcca9848e02942cea294315baa9cc Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 20 18:41:05 2021 +0300 home: fix 8 to 9 migration
This commit is contained in:
@@ -490,7 +490,16 @@ func upgradeSchema8to9(diskConf yobj) (err error) {
|
||||
return fmt.Errorf("unexpected type of dns: %T", dnsVal)
|
||||
}
|
||||
|
||||
autohostTLDVal := dns["autohost_tld"]
|
||||
autohostTLDVal, ok := dns["autohost_tld"]
|
||||
if !ok {
|
||||
// This happens when upgrading directly from v0.105.2, because
|
||||
// dns.autohost_tld was never set to any value. Go on and leave
|
||||
// it that way.
|
||||
//
|
||||
// See https://github.com/AdguardTeam/AdGuardHome/issues/2988.
|
||||
return nil
|
||||
}
|
||||
|
||||
autohostTLD, ok := autohostTLDVal.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("undexpected type of dns.autohost_tld: %T", autohostTLDVal)
|
||||
|
||||
Reference in New Issue
Block a user