diff --git a/db.go b/db.go index 41949525..f4aae335 100644 --- a/db.go +++ b/db.go @@ -110,7 +110,10 @@ func (h *Headscale) initDB() error { continue } - err = db.Preload("Machine").Where("machine_id = ? AND prefix = ?", machine.ID, IPPrefix(prefix)).First(&Route{}).Error + err = db.Preload("Machine"). + Where("machine_id = ? AND prefix = ?", machine.ID, IPPrefix(prefix)). + First(&Route{}). + Error if err == nil { log.Info(). Str("enabled_route", prefix.String()).