{"action":"closed","number":1091,"pull_request":{"url":"https://api.github.com/repos/SickRage/SickRage/pulls/1091","id":61786194,"html_url":"https://github.com/SickRage/SickRage/pull/1091","diff_url":"https://github.com/SickRage/SickRage/pull/1091.diff","patch_url":"https://github.com/SickRage/SickRage/pull/1091.patch","issue_url":"https://api.github.com/repos/SickRage/SickRage/issues/1091","number":1091,"state":"closed","locked":false,"title":"Fix \"'NoneType' object has no attribute 'indexerid'\" when deleting a show","user":{"login":"halldor","id":250921,"avatar_url":"https://avatars.githubusercontent.com/u/250921?v=3","gravatar_id":"","url":"https://api.github.com/users/halldor","html_url":"https://github.com/halldor","followers_url":"https://api.github.com/users/halldor/followers","following_url":"https://api.github.com/users/halldor/following{/other_user}","gists_url":"https://api.github.com/users/halldor/gists{/gist_id}","starred_url":"https://api.github.com/users/halldor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halldor/subscriptions","organizations_url":"https://api.github.com/users/halldor/orgs","repos_url":"https://api.github.com/users/halldor/repos","events_url":"https://api.github.com/users/halldor/events{/privacy}","received_events_url":"https://api.github.com/users/halldor/received_events","type":"User","site_admin":false},"body":"When deleting a show while new shows are being added I ran into the following error.\r\n\r\n```\r\n2016-02-29 00:14:44 Thread-16 :: Failed doing webui callback: Traceback (most recent call last):\r\n  File \"/srv/sickrage/SickRage/sickbeard/webserve.py\", line 287, in async_call\r\n    result = function(**kwargs)\r\n  File \"/srv/sickrage/SickRage/sickbeard/webserve.py\", line 1606, in deleteShow\r\n    error, show = Show.delete(show, full)\r\n  File \"/srv/sickrage/SickRage/sickrage/show/Show.py\", line 51, in delete\r\n    sickbeard.showQueueScheduler.action.removeShow(show, bool(remove_files))\r\n  File \"/srv/sickrage/SickRage/sickbeard/show_queue.py\", line 174, in removeShow\r\n    if all([item, item.show, item != self.currentItem, show.indexerid == item.show.indexerid]):\r\nAttributeError: 'NoneType' object has no attribute 'indexerid'\r\n [4ff8246]\r\n2016-02-29 00:14:22 Thread-15 :: Failed doing webui callback: Traceback (most recent call last):\r\n  File \"/srv/sickrage/SickRage/sickbeard/webserve.py\", line 287, in async_call\r\n    result = function(**kwargs)\r\n  File \"/srv/sickrage/SickRage/sickbeard/webserve.py\", line 1606, in deleteShow\r\n    error, show = Show.delete(show, full)\r\n  File \"/srv/sickrage/SickRage/sickrage/show/Show.py\", line 51, in delete\r\n    sickbeard.showQueueScheduler.action.removeShow(show, bool(remove_files))\r\n  File \"/srv/sickrage/SickRage/sickbeard/show_queue.py\", line 174, in removeShow\r\n    if all([item, item.show, item != self.currentItem, show.indexerid == item.show.indexerid]):\r\nAttributeError: 'NoneType' object has no attribute 'indexerid'\r\n [4ff8246]\r\n```\r\n\r\nThe reason is that the any([...]) check that was being used evaluates all items of the list so that checking `item.show` doesn't do anything to guard against it being None later in the list (when `item.show.indexerid` is used).","created_at":"2016-03-04T23:19:34Z","updated_at":"2016-03-05T02:42:32Z","closed_at":"2016-03-05T02:42:32Z","merged_at":"2016-03-05T02:42:32Z","merge_commit_sha":"0777cc968cc06fbc0759ed3084fba7e1a3003425","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SickRage/SickRage/pulls/1091/commits","review_comments_url":"https://api.github.com/repos/SickRage/SickRage/pulls/1091/comments","review_comment_url":"https://api.github.com/repos/SickRage/SickRage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SickRage/SickRage/issues/1091/comments","statuses_url":"https://api.github.com/repos/SickRage/SickRage/statuses/c0e08afb8c8ad5753ddd372d9d38ea7eeefabf54","head":{"label":"halldor:develop","ref":"develop","sha":"c0e08afb8c8ad5753ddd372d9d38ea7eeefabf54","user":{"login":"halldor","id":250921,"avatar_url":"https://avatars.githubusercontent.com/u/250921?v=3","gravatar_id":"","url":"https://api.github.com/users/halldor","html_url":"https://github.com/halldor","followers_url":"https://api.github.com/users/halldor/followers","following_url":"https://api.github.com/users/halldor/following{/other_user}","gists_url":"https://api.github.com/users/halldor/gists{/gist_id}","starred_url":"https://api.github.com/users/halldor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halldor/subscriptions","organizations_url":"https://api.github.com/users/halldor/orgs","repos_url":"https://api.github.com/users/halldor/repos","events_url":"https://api.github.com/users/halldor/events{/privacy}","received_events_url":"https://api.github.com/users/halldor/received_events","type":"User","site_admin":false},"repo":{"id":52759438,"name":"SickRage","full_name":"halldor/SickRage","owner":{"login":"halldor","id":250921,"avatar_url":"https://avatars.githubusercontent.com/u/250921?v=3","gravatar_id":"","url":"https://api.github.com/users/halldor","html_url":"https://github.com/halldor","followers_url":"https://api.github.com/users/halldor/followers","following_url":"https://api.github.com/users/halldor/following{/other_user}","gists_url":"https://api.github.com/users/halldor/gists{/gist_id}","starred_url":"https://api.github.com/users/halldor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halldor/subscriptions","organizations_url":"https://api.github.com/users/halldor/orgs","repos_url":"https://api.github.com/users/halldor/repos","events_url":"https://api.github.com/users/halldor/events{/privacy}","received_events_url":"https://api.github.com/users/halldor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/halldor/SickRage","description":"The new home of the SickRage community","fork":true,"url":"https://api.github.com/repos/halldor/SickRage","forks_url":"https://api.github.com/repos/halldor/SickRage/forks","keys_url":"https://api.github.com/repos/halldor/SickRage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/halldor/SickRage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/halldor/SickRage/teams","hooks_url":"https://api.github.com/repos/halldor/SickRage/hooks","issue_events_url":"https://api.github.com/repos/halldor/SickRage/issues/events{/number}","events_url":"https://api.github.com/repos/halldor/SickRage/events","assignees_url":"https://api.github.com/repos/halldor/SickRage/assignees{/user}","branches_url":"https://api.github.com/repos/halldor/SickRage/branches{/branch}","tags_url":"https://api.github.com/repos/halldor/SickRage/tags","blobs_url":"https://api.github.com/repos/halldor/SickRage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/halldor/SickRage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/halldor/SickRage/git/refs{/sha}","trees_url":"https://api.github.com/repos/halldor/SickRage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/halldor/SickRage/statuses/{sha}","languages_url":"https://api.github.com/repos/halldor/SickRage/languages","stargazers_url":"https://api.github.com/repos/halldor/SickRage/stargazers","contributors_url":"https://api.github.com/repos/halldor/SickRage/contributors","subscribers_url":"https://api.github.com/repos/halldor/SickRage/subscribers","subscription_url":"https://api.github.com/repos/halldor/SickRage/subscription","commits_url":"https://api.github.com/repos/halldor/SickRage/commits{/sha}","git_commits_url":"https://api.github.com/repos/halldor/SickRage/git/commits{/sha}","comments_url":"https://api.github.com/repos/halldor/SickRage/comments{/number}","issue_comment_url":"https://api.github.com/repos/halldor/SickRage/issues/comments{/number}","contents_url":"https://api.github.com/repos/halldor/SickRage/contents/{+path}","compare_url":"https://api.github.com/repos/halldor/SickRage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/halldor/SickRage/merges","archive_url":"https://api.github.com/repos/halldor/SickRage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/halldor/SickRage/downloads","issues_url":"https://api.github.com/repos/halldor/SickRage/issues{/number}","pulls_url":"https://api.github.com/repos/halldor/SickRage/pulls{/number}","milestones_url":"https://api.github.com/repos/halldor/SickRage/milestones{/number}","notifications_url":"https://api.github.com/repos/halldor/SickRage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/halldor/SickRage/labels{/name}","releases_url":"https://api.github.com/repos/halldor/SickRage/releases{/id}","deployments_url":"https://api.github.com/repos/halldor/SickRage/deployments","created_at":"2016-02-29T02:54:47Z","updated_at":"2016-02-29T02:54:54Z","pushed_at":"2016-03-04T23:11:11Z","git_url":"git://github.com/halldor/SickRage.git","ssh_url":"git@github.com:halldor/SickRage.git","clone_url":"https://github.com/halldor/SickRage.git","svn_url":"https://github.com/halldor/SickRage","homepage":"https://sickrage.github.io","size":49499,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"SickRage:develop","ref":"develop","sha":"1c9f63f781617343201c7b0bcf34d3a1551df46b","user":{"login":"SickRage","id":15840255,"avatar_url":"https://avatars.githubusercontent.com/u/15840255?v=3","gravatar_id":"","url":"https://api.github.com/users/SickRage","html_url":"https://github.com/SickRage","followers_url":"https://api.github.com/users/SickRage/followers","following_url":"https://api.github.com/users/SickRage/following{/other_user}","gists_url":"https://api.github.com/users/SickRage/gists{/gist_id}","starred_url":"https://api.github.com/users/SickRage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SickRage/subscriptions","organizations_url":"https://api.github.com/users/SickRage/orgs","repos_url":"https://api.github.com/users/SickRage/repos","events_url":"https://api.github.com/users/SickRage/events{/privacy}","received_events_url":"https://api.github.com/users/SickRage/received_events","type":"Organization","site_admin":false},"repo":{"id":46151823,"name":"SickRage","full_name":"SickRage/SickRage","owner":{"login":"SickRage","id":15840255,"avatar_url":"https://avatars.githubusercontent.com/u/15840255?v=3","gravatar_id":"","url":"https://api.github.com/users/SickRage","html_url":"https://github.com/SickRage","followers_url":"https://api.github.com/users/SickRage/followers","following_url":"https://api.github.com/users/SickRage/following{/other_user}","gists_url":"https://api.github.com/users/SickRage/gists{/gist_id}","starred_url":"https://api.github.com/users/SickRage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SickRage/subscriptions","organizations_url":"https://api.github.com/users/SickRage/orgs","repos_url":"https://api.github.com/users/SickRage/repos","events_url":"https://api.github.com/users/SickRage/events{/privacy}","received_events_url":"https://api.github.com/users/SickRage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SickRage/SickRage","description":"The new home of the SickRage community","fork":false,"url":"https://api.github.com/repos/SickRage/SickRage","forks_url":"https://api.github.com/repos/SickRage/SickRage/forks","keys_url":"https://api.github.com/repos/SickRage/SickRage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SickRage/SickRage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SickRage/SickRage/teams","hooks_url":"https://api.github.com/repos/SickRage/SickRage/hooks","issue_events_url":"https://api.github.com/repos/SickRage/SickRage/issues/events{/number}","events_url":"https://api.github.com/repos/SickRage/SickRage/events","assignees_url":"https://api.github.com/repos/SickRage/SickRage/assignees{/user}","branches_url":"https://api.github.com/repos/SickRage/SickRage/branches{/branch}","tags_url":"https://api.github.com/repos/SickRage/SickRage/tags","blobs_url":"https://api.github.com/repos/SickRage/SickRage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SickRage/SickRage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SickRage/SickRage/git/refs{/sha}","trees_url":"https://api.github.com/repos/SickRage/SickRage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SickRage/SickRage/statuses/{sha}","languages_url":"https://api.github.com/repos/SickRage/SickRage/languages","stargazers_url":"https://api.github.com/repos/SickRage/SickRage/stargazers","contributors_url":"https://api.github.com/repos/SickRage/SickRage/contributors","subscribers_url":"https://api.github.com/repos/SickRage/SickRage/subscribers","subscription_url":"https://api.github.com/repos/SickRage/SickRage/subscription","commits_url":"https://api.github.com/repos/SickRage/SickRage/commits{/sha}","git_commits_url":"https://api.github.com/repos/SickRage/SickRage/git/commits{/sha}","comments_url":"https://api.github.com/repos/SickRage/SickRage/comments{/number}","issue_comment_url":"https://api.github.com/repos/SickRage/SickRage/issues/comments{/number}","contents_url":"https://api.github.com/repos/SickRage/SickRage/contents/{+path}","compare_url":"https://api.github.com/repos/SickRage/SickRage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SickRage/SickRage/merges","archive_url":"https://api.github.com/repos/SickRage/SickRage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SickRage/SickRage/downloads","issues_url":"https://api.github.com/repos/SickRage/SickRage/issues{/number}","pulls_url":"https://api.github.com/repos/SickRage/SickRage/pulls{/number}","milestones_url":"https://api.github.com/repos/SickRage/SickRage/milestones{/number}","notifications_url":"https://api.github.com/repos/SickRage/SickRage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SickRage/SickRage/labels{/name}","releases_url":"https://api.github.com/repos/SickRage/SickRage/releases{/id}","deployments_url":"https://api.github.com/repos/SickRage/SickRage/deployments","created_at":"2015-11-13T23:01:22Z","updated_at":"2016-03-04T17:17:51Z","pushed_at":"2016-03-05T02:42:32Z","git_url":"git://github.com/SickRage/SickRage.git","ssh_url":"git@github.com:SickRage/SickRage.git","clone_url":"https://github.com/SickRage/SickRage.git","svn_url":"https://github.com/SickRage/SickRage","homepage":"https://sickrage.github.io","size":54152,"stargazers_count":478,"watchers_count":478,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":143,"mirror_url":null,"open_issues_count":7,"forks":143,"open_issues":7,"watchers":478,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SickRage/SickRage/pulls/1091"},"html":{"href":"https://github.com/SickRage/SickRage/pull/1091"},"issue":{"href":"https://api.github.com/repos/SickRage/SickRage/issues/1091"},"comments":{"href":"https://api.github.com/repos/SickRage/SickRage/issues/1091/comments"},"review_comments":{"href":"https://api.github.com/repos/SickRage/SickRage/pulls/1091/comments"},"review_comment":{"href":"https://api.github.com/repos/SickRage/SickRage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SickRage/SickRage/pulls/1091/commits"},"statuses":{"href":"https://api.github.com/repos/SickRage/SickRage/statuses/c0e08afb8c8ad5753ddd372d9d38ea7eeefabf54"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"miigotu","id":390379,"avatar_url":"https://avatars.githubusercontent.com/u/390379?v=3","gravatar_id":"","url":"https://api.github.com/users/miigotu","html_url":"https://github.com/miigotu","followers_url":"https://api.github.com/users/miigotu/followers","following_url":"https://api.github.com/users/miigotu/following{/other_user}","gists_url":"https://api.github.com/users/miigotu/gists{/gist_id}","starred_url":"https://api.github.com/users/miigotu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miigotu/subscriptions","organizations_url":"https://api.github.com/users/miigotu/orgs","repos_url":"https://api.github.com/users/miigotu/repos","events_url":"https://api.github.com/users/miigotu/events{/privacy}","received_events_url":"https://api.github.com/users/miigotu/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}