{"action":"created","comment":{"url":"https://api.github.com/repos/Katello/katello/pulls/comments/29352503","id":29352503,"diff_hunk":"@@ -388,8 +388,13 @@ def setup_content_view(cv_id)\n     end\n \n     def systems_by_errata(errata_uuids, installable, non_installable)\n-      installable = installable.nil? ? false : installable.to_bool\n-      non_installable = non_installable.nil? ? false : non_installable.to_bool\n+      if !!installable != installable\n+        installable = installable.nil? ? false : installable.to_bool\n+      end\n+\n+      if !!non_installable != non_installable\n+        non_installable = non_installable.nil? ? false : non_installable.to_bool\n+      end","path":"app/controllers/katello/api/v2/systems_controller.rb","position":12,"original_position":12,"commit_id":"77eb8ac57f4eb24f32b434d4197ddb4f3fceb3a7","original_commit_id":"77eb8ac57f4eb24f32b434d4197ddb4f3fceb3a7","user":{"login":"ehelms","id":293363,"avatar_url":"https://avatars.githubusercontent.com/u/293363?v=3","gravatar_id":"","url":"https://api.github.com/users/ehelms","html_url":"https://github.com/ehelms","followers_url":"https://api.github.com/users/ehelms/followers","following_url":"https://api.github.com/users/ehelms/following{/other_user}","gists_url":"https://api.github.com/users/ehelms/gists{/gist_id}","starred_url":"https://api.github.com/users/ehelms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehelms/subscriptions","organizations_url":"https://api.github.com/users/ehelms/orgs","repos_url":"https://api.github.com/users/ehelms/repos","events_url":"https://api.github.com/users/ehelms/events{/privacy}","received_events_url":"https://api.github.com/users/ehelms/received_events","type":"User","site_admin":false},"body":"You lost me as I don't see any of those things here in this method other than the errata_uuids. If we want to check that `installable` or `non_installable` are booleans, why don't we just do that in the if-statement?\r\n\r\n```\r\nif installable == true\r\n....\r\n```","created_at":"2015-04-29T16:19:27Z","updated_at":"2015-04-29T16:19:27Z","html_url":"https://github.com/Katello/katello/pull/5198#discussion_r29352503","pull_request_url":"https://api.github.com/repos/Katello/katello/pulls/5198","_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments/29352503"},"html":{"href":"https://github.com/Katello/katello/pull/5198#discussion_r29352503"},"pull_request":{"href":"https://api.github.com/repos/Katello/katello/pulls/5198"}}},"pull_request":{"url":"https://api.github.com/repos/Katello/katello/pulls/5198","id":34370576,"html_url":"https://github.com/Katello/katello/pull/5198","diff_url":"https://github.com/Katello/katello/pull/5198.diff","patch_url":"https://github.com/Katello/katello/pull/5198.patch","issue_url":"https://api.github.com/repos/Katello/katello/issues/5198","number":5198,"state":"open","locked":false,"title":"Fixes #10308: prevent ISE on errata content hosts page BZ1216200.","user":{"login":"waldenraines","id":4116405,"avatar_url":"https://avatars.githubusercontent.com/u/4116405?v=3","gravatar_id":"","url":"https://api.github.com/users/waldenraines","html_url":"https://github.com/waldenraines","followers_url":"https://api.github.com/users/waldenraines/followers","following_url":"https://api.github.com/users/waldenraines/following{/other_user}","gists_url":"https://api.github.com/users/waldenraines/gists{/gist_id}","starred_url":"https://api.github.com/users/waldenraines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldenraines/subscriptions","organizations_url":"https://api.github.com/users/waldenraines/orgs","repos_url":"https://api.github.com/users/waldenraines/repos","events_url":"https://api.github.com/users/waldenraines/events{/privacy}","received_events_url":"https://api.github.com/users/waldenraines/received_events","type":"User","site_admin":false},"body":"We were attempting to convert any value of installable and non_installable\r\nto boolean even if it was already a boolean.  This commit only converts the\r\nvalues to boolean if they are not already booleans.\r\n\r\nhttp://projects.theforeman.org/issues/10308\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1216200","created_at":"2015-04-29T14:49:29Z","updated_at":"2015-04-29T16:19:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"579659914ac8e79e11d80ed975be0dc64fc5d815","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Katello/katello/pulls/5198/commits","review_comments_url":"https://api.github.com/repos/Katello/katello/pulls/5198/comments","review_comment_url":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Katello/katello/issues/5198/comments","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/77eb8ac57f4eb24f32b434d4197ddb4f3fceb3a7","head":{"label":"waldenraines:10308","ref":"10308","sha":"77eb8ac57f4eb24f32b434d4197ddb4f3fceb3a7","user":{"login":"waldenraines","id":4116405,"avatar_url":"https://avatars.githubusercontent.com/u/4116405?v=3","gravatar_id":"","url":"https://api.github.com/users/waldenraines","html_url":"https://github.com/waldenraines","followers_url":"https://api.github.com/users/waldenraines/followers","following_url":"https://api.github.com/users/waldenraines/following{/other_user}","gists_url":"https://api.github.com/users/waldenraines/gists{/gist_id}","starred_url":"https://api.github.com/users/waldenraines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldenraines/subscriptions","organizations_url":"https://api.github.com/users/waldenraines/orgs","repos_url":"https://api.github.com/users/waldenraines/repos","events_url":"https://api.github.com/users/waldenraines/events{/privacy}","received_events_url":"https://api.github.com/users/waldenraines/received_events","type":"User","site_admin":false},"repo":{"id":9356709,"name":"katello","full_name":"waldenraines/katello","owner":{"login":"waldenraines","id":4116405,"avatar_url":"https://avatars.githubusercontent.com/u/4116405?v=3","gravatar_id":"","url":"https://api.github.com/users/waldenraines","html_url":"https://github.com/waldenraines","followers_url":"https://api.github.com/users/waldenraines/followers","following_url":"https://api.github.com/users/waldenraines/following{/other_user}","gists_url":"https://api.github.com/users/waldenraines/gists{/gist_id}","starred_url":"https://api.github.com/users/waldenraines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldenraines/subscriptions","organizations_url":"https://api.github.com/users/waldenraines/orgs","repos_url":"https://api.github.com/users/waldenraines/repos","events_url":"https://api.github.com/users/waldenraines/events{/privacy}","received_events_url":"https://api.github.com/users/waldenraines/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/waldenraines/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":true,"url":"https://api.github.com/repos/waldenraines/katello","forks_url":"https://api.github.com/repos/waldenraines/katello/forks","keys_url":"https://api.github.com/repos/waldenraines/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/waldenraines/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/waldenraines/katello/teams","hooks_url":"https://api.github.com/repos/waldenraines/katello/hooks","issue_events_url":"https://api.github.com/repos/waldenraines/katello/issues/events{/number}","events_url":"https://api.github.com/repos/waldenraines/katello/events","assignees_url":"https://api.github.com/repos/waldenraines/katello/assignees{/user}","branches_url":"https://api.github.com/repos/waldenraines/katello/branches{/branch}","tags_url":"https://api.github.com/repos/waldenraines/katello/tags","blobs_url":"https://api.github.com/repos/waldenraines/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/waldenraines/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/waldenraines/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/waldenraines/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/waldenraines/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/waldenraines/katello/languages","stargazers_url":"https://api.github.com/repos/waldenraines/katello/stargazers","contributors_url":"https://api.github.com/repos/waldenraines/katello/contributors","subscribers_url":"https://api.github.com/repos/waldenraines/katello/subscribers","subscription_url":"https://api.github.com/repos/waldenraines/katello/subscription","commits_url":"https://api.github.com/repos/waldenraines/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/waldenraines/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/waldenraines/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/waldenraines/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/waldenraines/katello/contents/{+path}","compare_url":"https://api.github.com/repos/waldenraines/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/waldenraines/katello/merges","archive_url":"https://api.github.com/repos/waldenraines/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/waldenraines/katello/downloads","issues_url":"https://api.github.com/repos/waldenraines/katello/issues{/number}","pulls_url":"https://api.github.com/repos/waldenraines/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/waldenraines/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/waldenraines/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/waldenraines/katello/labels{/name}","releases_url":"https://api.github.com/repos/waldenraines/katello/releases{/id}","created_at":"2013-04-10T21:49:02Z","updated_at":"2014-06-24T21:15:25Z","pushed_at":"2015-04-29T15:21:19Z","git_url":"git://github.com/waldenraines/katello.git","ssh_url":"git@github.com:waldenraines/katello.git","clone_url":"https://github.com/waldenraines/katello.git","svn_url":"https://github.com/waldenraines/katello","homepage":"katello.org","size":73007,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Katello:master","ref":"master","sha":"f61d651cdefe91fce219900613259ab84e374877","user":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"repo":{"id":4007018,"name":"katello","full_name":"Katello/katello","owner":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Katello/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":false,"url":"https://api.github.com/repos/Katello/katello","forks_url":"https://api.github.com/repos/Katello/katello/forks","keys_url":"https://api.github.com/repos/Katello/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Katello/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Katello/katello/teams","hooks_url":"https://api.github.com/repos/Katello/katello/hooks","issue_events_url":"https://api.github.com/repos/Katello/katello/issues/events{/number}","events_url":"https://api.github.com/repos/Katello/katello/events","assignees_url":"https://api.github.com/repos/Katello/katello/assignees{/user}","branches_url":"https://api.github.com/repos/Katello/katello/branches{/branch}","tags_url":"https://api.github.com/repos/Katello/katello/tags","blobs_url":"https://api.github.com/repos/Katello/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Katello/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Katello/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/Katello/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/Katello/katello/languages","stargazers_url":"https://api.github.com/repos/Katello/katello/stargazers","contributors_url":"https://api.github.com/repos/Katello/katello/contributors","subscribers_url":"https://api.github.com/repos/Katello/katello/subscribers","subscription_url":"https://api.github.com/repos/Katello/katello/subscription","commits_url":"https://api.github.com/repos/Katello/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/Katello/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/Katello/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/Katello/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/Katello/katello/contents/{+path}","compare_url":"https://api.github.com/repos/Katello/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Katello/katello/merges","archive_url":"https://api.github.com/repos/Katello/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Katello/katello/downloads","issues_url":"https://api.github.com/repos/Katello/katello/issues{/number}","pulls_url":"https://api.github.com/repos/Katello/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/Katello/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/Katello/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Katello/katello/labels{/name}","releases_url":"https://api.github.com/repos/Katello/katello/releases{/id}","created_at":"2012-04-12T16:59:08Z","updated_at":"2015-04-29T12:49:32Z","pushed_at":"2015-04-29T15:21:21Z","git_url":"git://github.com/Katello/katello.git","ssh_url":"git@github.com:Katello/katello.git","clone_url":"https://github.com/Katello/katello.git","svn_url":"https://github.com/Katello/katello","homepage":"katello.org","size":233849,"stargazers_count":155,"watchers_count":155,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":98,"forks":107,"open_issues":98,"watchers":155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/5198"},"html":{"href":"https://github.com/Katello/katello/pull/5198"},"issue":{"href":"https://api.github.com/repos/Katello/katello/issues/5198"},"comments":{"href":"https://api.github.com/repos/Katello/katello/issues/5198/comments"},"review_comments":{"href":"https://api.github.com/repos/Katello/katello/pulls/5198/comments"},"review_comment":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Katello/katello/pulls/5198/commits"},"statuses":{"href":"https://api.github.com/repos/Katello/katello/statuses/77eb8ac57f4eb24f32b434d4197ddb4f3fceb3a7"}}}}