Skip to content

Commit

Permalink
fixes #21274 - determine cvv errata based on errata_counts total
Browse files Browse the repository at this point in the history
This is a small change to address an edge case where when a user
would view the details of a content view version in the UI, they
may not see the Errata tab.

This was occuring in cases where the errata_counts had null
as the first entry in the result set (e.g.
errata_counts['security']==null).  Since the
version['errata_counts'] (if included) will include a
'total', this logic will use that total to decide if the
Errata tab will be shown.
  • Loading branch information
bbuckingham committed Oct 24, 2017
1 parent 6425301 commit 757f7f2
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -26,10 +26,11 @@
$scope.hasErrata = function (version) {
var found = false;

found = _.find(version['errata_counts'], function (counts) {
return counts !== 0;
});

if (version['errata_counts'] &&
version['errata_counts'].total &&
version['errata_counts'].total !== 0) {
return true;
}
return found;
};

Expand Down

0 comments on commit 757f7f2

Please sign in to comment.