{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/connector/issues/208","repository_url":"https://api.github.com/repos/OCA/connector","labels_url":"https://api.github.com/repos/OCA/connector/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/OCA/connector/issues/208/comments","events_url":"https://api.github.com/repos/OCA/connector/issues/208/events","html_url":"https://github.com/OCA/connector/pull/208","id":176813845,"number":208,"title":"[9.0][FIX] connector: Zero value assertion","user":{"login":"lasley","id":7397578,"avatar_url":"https://avatars.githubusercontent.com/u/7397578?v=3","gravatar_id":"","url":"https://api.github.com/users/lasley","html_url":"https://github.com/lasley","followers_url":"https://api.github.com/users/lasley/followers","following_url":"https://api.github.com/users/lasley/following{/other_user}","gists_url":"https://api.github.com/users/lasley/gists{/gist_id}","starred_url":"https://api.github.com/users/lasley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasley/subscriptions","organizations_url":"https://api.github.com/users/lasley/orgs","repos_url":"https://api.github.com/users/lasley/repos","events_url":"https://api.github.com/users/lasley/events{/privacy}","received_events_url":"https://api.github.com/users/lasley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OCA/connector/labels/needs%20review","name":"needs review","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/OCA/connector/milestones/1","html_url":"https://github.com/OCA/connector/milestones/9.0","labels_url":"https://api.github.com/repos/OCA/connector/milestones/1/labels","id":1354310,"number":1,"title":"9.0","description":null,"creator":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars.githubusercontent.com/u/7165771?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2015-10-14T00:20:22Z","updated_at":"2016-09-14T04:45:10Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-09-14T04:45:09Z","updated_at":"2016-09-14T07:03:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OCA/connector/pulls/208","html_url":"https://github.com/OCA/connector/pull/208","diff_url":"https://github.com/OCA/connector/pull/208.diff","patch_url":"https://github.com/OCA/connector/pull/208.patch"},"body":"* Switch zero assertion to type strict eval (`is`)\r\n\r\nBefore:\r\n```\r\n>>> external_id = False\r\n>>> binding_id = True\r\n>>> assert (external_id or external_id == 0) and binding_id\r\n# No assertion raised\r\n```\r\n\r\n\r\nAfter\r\n```python\r\n>>> external_id = 'test'\r\n>>> assert (external_id or external_id is 0) and binding_id\r\n>>> external_id = 0\r\n>>> assert (external_id or external_id is 0) and binding_id\r\n>>> external_id = False\r\n>>> assert (external_id or external_id is 0) and binding_id\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nAssertionError\r\n>>> external_id = None\r\n>>> assert (external_id or external_id is 0) and binding_id\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nAssertionError\r\n```\r\n\r\nTaken from my fix in OCA/connector-magento#220 - not sure why the code is duplicated ¯\\_(ツ)_/¯"},"comment":{"url":"https://api.github.com/repos/OCA/connector/issues/comments/246924257","html_url":"https://github.com/OCA/connector/pull/208#issuecomment-246924257","issue_url":"https://api.github.com/repos/OCA/connector/issues/208","id":246924257,"user":{"login":"simahawk","id":347149,"avatar_url":"https://avatars.githubusercontent.com/u/347149?v=3","gravatar_id":"","url":"https://api.github.com/users/simahawk","html_url":"https://github.com/simahawk","followers_url":"https://api.github.com/users/simahawk/followers","following_url":"https://api.github.com/users/simahawk/following{/other_user}","gists_url":"https://api.github.com/users/simahawk/gists{/gist_id}","starred_url":"https://api.github.com/users/simahawk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simahawk/subscriptions","organizations_url":"https://api.github.com/users/simahawk/orgs","repos_url":"https://api.github.com/users/simahawk/repos","events_url":"https://api.github.com/users/simahawk/events{/privacy}","received_events_url":"https://api.github.com/users/simahawk/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T07:03:27Z","updated_at":"2016-09-14T07:03:27Z","body":":+1: "}}
{"actor":{"display_login":"simahawk"}}