diff --git a/rules/interface.go b/rules/interface.go index 9e95f60..f79885f 100644 --- a/rules/interface.go +++ b/rules/interface.go @@ -32,7 +32,7 @@ func (br *BaseRule) baseInsert(category string, hostname string, paramsJSON []by } func (br *BaseRule) baseUpdate(category string, oldhostname string, hostname string, paramsJSON []byte) error { - exists, err := db.HostnameExists(category, hostname) + exists, err := db.HostnameExists(category, oldhostname) if err != nil { return fmt.Errorf("error checking existence of hostname: %v", err.Error()) }