Skip to content

Commit ce9d23c

Browse files
committed
RHINENG-18242: fix probably want to use time.Time.Equal instead
1 parent 63b089d commit ce9d23c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

manager/controllers/advisory_detail.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func tryGetAdvisoryFromCache(advisoryName string) *AdvisoryDetailResponse {
200200
middlewares.AdvisoryDetailCnt.WithLabelValues("hit").Inc()
201201

202202
emptyTime := time.Time{}
203-
if val.Data.Attributes.PublicDate == nil || *val.Data.Attributes.PublicDate == emptyTime {
203+
if val.Data.Attributes.PublicDate == nil || val.Data.Attributes.PublicDate.Equal(emptyTime) {
204204
// advisory is found in cache but was inserted from yum_updates
205205
// it is missing all attributes such as description, public_date, modified_date, etc.
206206
// these attributes are added after the advisory is synced by vmaas-sync

0 commit comments

Comments
 (0)