{"action":"created","issue":{"url":"https://api.github.com/repos/mirumee/saleor/issues/3310","repository_url":"https://api.github.com/repos/mirumee/saleor","labels_url":"https://api.github.com/repos/mirumee/saleor/issues/3310/labels{/name}","comments_url":"https://api.github.com/repos/mirumee/saleor/issues/3310/comments","events_url":"https://api.github.com/repos/mirumee/saleor/issues/3310/events","html_url":"https://github.com/mirumee/saleor/pull/3310","id":383398515,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyODczMTA3","number":3310,"title":"Remove runtime warning when product has discount","user":{"login":"jxltom","id":1401630,"node_id":"MDQ6VXNlcjE0MDE2MzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1401630?v=4","gravatar_id":"","url":"https://api.github.com/users/jxltom","html_url":"https://github.com/jxltom","followers_url":"https://api.github.com/users/jxltom/followers","following_url":"https://api.github.com/users/jxltom/following{/other_user}","gists_url":"https://api.github.com/users/jxltom/gists{/gist_id}","starred_url":"https://api.github.com/users/jxltom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxltom/subscriptions","organizations_url":"https://api.github.com/users/jxltom/orgs","repos_url":"https://api.github.com/users/jxltom/repos","events_url":"https://api.github.com/users/jxltom/events{/privacy}","received_events_url":"https://api.github.com/users/jxltom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-22T06:37:13Z","updated_at":"2018-11-22T06:48:17Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mirumee/saleor/pulls/3310","html_url":"https://github.com/mirumee/saleor/pull/3310","diff_url":"https://github.com/mirumee/saleor/pull/3310.diff","patch_url":"https://github.com/mirumee/saleor/pull/3310.patch"},"body":"It is acutally not a bug. It happens when product has discounts.\r\n\r\n```\r\n.local/share/virtualenvs/saleor-Ar4mgESs/lib/python3.6/site-packages/django/template/defaulttags.py:308: RuntimeWarning: `bool(taxed_money)` will always evaluate to True, consider replacing the test with explicit `if taxed_money is None` or `if taxed_money.gross`.\r\n  if match:\r\n```\r\n\r\nIt is because ```availability.discount``` can be ```None``` or ```TaxedMoney``` which is returned in ```get_availability```, but the templates doesn't know it.\r\n\r\nAnyway, this PR removes the annoying warning.\r\n\r\n### Pull Request Checklist\r\n\r\n<!-- Please keep this section. It will make maintainer's life easier. -->\r\n\r\n1. [ ] Privileged views and APIs are guarded by proper permission checks.\r\n1. [ ] All visible strings are translated with proper context.\r\n1. [ ] All data-formatting is locale-aware (dates, numbers, and so on).\r\n1. [ ] Database queries are optimized and the number of queries is constant.\r\n1. [ ] The changes are tested.\r\n1. [ ] The code is documented (docstrings, project documentation).\r\n1. [ ] GraphQL schema and type definitions are up to date.\r\n"},"comment":{"url":"https://api.github.com/repos/mirumee/saleor/issues/comments/440929716","html_url":"https://github.com/mirumee/saleor/pull/3310#issuecomment-440929716","issue_url":"https://api.github.com/repos/mirumee/saleor/issues/3310","id":440929716,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDkyOTcxNg==","user":{"login":"codecov[bot]","id":22429695,"node_id":"MDM6Qm90MjI0Mjk2OTU=","avatar_url":"https://avatars2.githubusercontent.com/in/254?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov%5Bbot%5D","html_url":"https://github.com/apps/codecov","followers_url":"https://api.github.com/users/codecov%5Bbot%5D/followers","following_url":"https://api.github.com/users/codecov%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codecov%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codecov%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codecov%5Bbot%5D/repos","events_url":"https://api.github.com/users/codecov%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codecov%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-11-22T06:48:17Z","updated_at":"2018-11-22T06:48:17Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/mirumee/saleor/pull/3310?src=pr&el=h1) Report\n> Merging [#3310](https://codecov.io/gh/mirumee/saleor/pull/3310?src=pr&el=desc) into [master](https://codecov.io/gh/mirumee/saleor/commit/0424cfb91d6738356855311f3149730adb87ef30?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/mirumee/saleor/pull/3310/graphs/tree.svg?width=650&token=qkNcTJ4TmI&height=150&src=pr)](https://codecov.io/gh/mirumee/saleor/pull/3310?src=pr&el=tree)\n\n```diff\n@@           Coverage Diff           @@\n##           master    #3310   +/-   ##\n=======================================\n  Coverage   89.51%   89.51%           \n=======================================\n  Files         232      232           \n  Lines       12530    12530           \n  Branches     1245     1245           \n=======================================\n  Hits        11216    11216           \n  Misses        921      921           \n  Partials      393      393\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/mirumee/saleor/pull/3310?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/mirumee/saleor/pull/3310?src=pr&el=footer). Last update [0424cfb...3ed9580](https://codecov.io/gh/mirumee/saleor/pull/3310?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov"}}