Skip to content

Commit c3f2177

Browse files
dominikvagnerMichaelMraka
authored andcommitted
RHINENG-21470: filter stale systems in sys-adv view
This adds a where condition that will filter out stale systems from the systems advisories view calls. This is done to ensure unified behavior (chosen systems) while planning remediation on the advisories FE page.
1 parent 68b3933 commit c3f2177

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

manager/controllers/systems_advisories_view.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ func advisoriesSystemsQuery(c *gin.Context, db *gorm.DB, acc int, groups map[str
158158
} else {
159159
query = query.Joins(spJoin)
160160
}
161-
query = query.Order("am.name, sp.inventory_id")
161+
query = query.
162+
Where("sp.stale = false").
163+
Order("am.name, sp.inventory_id")
162164

163165
meta, links, err := UpdateMetaLinks(c, meta, total, nil, params...)
164166
return query, meta, links, err

0 commit comments

Comments
 (0)