diff --git a/src/models/host.go b/src/models/host.go index 39ceabb864e650260191dba177c2883392f3bed6..1965e7c463b7942c8816217b5fcf196f6e0dcf1e 100644 --- a/src/models/host.go +++ b/src/models/host.go @@ -148,7 +148,9 @@ func HostGetsForAdmin(tenant, query, batch, field string, limit, offset int) ([] func buildHostWhere(tenant, query, batch, field string) *xorm.Session { session := DB["ams"].Table(new(Host)).OrderBy("ident") - if tenant != "" { + if tenant == "0" { + session = session.Where("tenant=?", "") + } else if tenant != "" { session = session.Where("tenant=?", tenant) }