Set NotFixedYet for Ubuntu Scan

This commit is contained in:
kota kanbe
2017-08-17 15:32:22 +09:00
parent 6129ac7bd4
commit de65073f61
2 changed files with 57 additions and 1 deletions

View File

@@ -45,8 +45,15 @@ type defPacks struct {
}
func (e defPacks) toPackStatuses() (ps models.PackageStatuses) {
packNotFixedYet := map[string]bool{}
for _, p := range e.def.AffectedPacks {
packNotFixedYet[p.Name] = p.NotFixedYet
}
for k := range e.actuallyAffectedPackNames {
ps = append(ps, models.PackageStatus{Name: k})
ps = append(ps, models.PackageStatus{
Name: k,
NotFixedYet: packNotFixedYet[k],
})
}
return
}