{"action":"created","comment":{"url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/comments/103243317","pull_request_review_id":24023925,"id":103243317,"diff_hunk":"@@ -119,15 +114,21 @@ def match_target_audience_of_item(profile, news_item):\n         if not profile.birthdate or not profile.gender:\n             return False\n \n-        news_item_gender = news_item.target_audience_gender\n+        if isinstance(news_item, NewsItem):\n+            min_age = news_item.target_audience_min_age\n+            max_age = news_item.target_audience_max_age\n+            news_item_gender = news_item.target_audience_gender\n+        else:\n+            min_age = news_item.target_audience.min_age","path":"src/rogerthat/models/news.py","position":72,"original_position":29,"commit_id":"523bcb43b96c7de0f84a3729ad27977e725c0d2e","original_commit_id":"523bcb43b96c7de0f84a3729ad27977e725c0d2e","user":{"login":"RubenMattan","id":1122760,"avatar_url":"https://avatars.githubusercontent.com/u/1122760?v=3","gravatar_id":"","url":"https://api.github.com/users/RubenMattan","html_url":"https://github.com/RubenMattan","followers_url":"https://api.github.com/users/RubenMattan/followers","following_url":"https://api.github.com/users/RubenMattan/following{/other_user}","gists_url":"https://api.github.com/users/RubenMattan/gists{/gist_id}","starred_url":"https://api.github.com/users/RubenMattan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubenMattan/subscriptions","organizations_url":"https://api.github.com/users/RubenMattan/orgs","repos_url":"https://api.github.com/users/RubenMattan/repos","events_url":"https://api.github.com/users/RubenMattan/events{/privacy}","received_events_url":"https://api.github.com/users/RubenMattan/received_events","type":"User","site_admin":false},"body":"news_item.target_audience can be None","created_at":"2017-02-27T16:10:29Z","updated_at":"2017-02-27T16:10:29Z","html_url":"https://github.com/rogerthat-platform/rogerthat-backend/pull/94#discussion_r103243317","pull_request_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/comments/103243317"},"html":{"href":"https://github.com/rogerthat-platform/rogerthat-backend/pull/94#discussion_r103243317"},"pull_request":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/94","id":105914223,"html_url":"https://github.com/rogerthat-platform/rogerthat-backend/pull/94","diff_url":"https://github.com/rogerthat-platform/rogerthat-backend/pull/94.diff","patch_url":"https://github.com/rogerthat-platform/rogerthat-backend/pull/94.patch","issue_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues/94","number":94,"state":"open","locked":false,"title":"News target audience","user":{"login":"abom","id":511438,"avatar_url":"https://avatars.githubusercontent.com/u/511438?v=3","gravatar_id":"","url":"https://api.github.com/users/abom","html_url":"https://github.com/abom","followers_url":"https://api.github.com/users/abom/followers","following_url":"https://api.github.com/users/abom/following{/other_user}","gists_url":"https://api.github.com/users/abom/gists{/gist_id}","starred_url":"https://api.github.com/users/abom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abom/subscriptions","organizations_url":"https://api.github.com/users/abom/orgs","repos_url":"https://api.github.com/users/abom/repos","events_url":"https://api.github.com/users/abom/events{/privacy}","received_events_url":"https://api.github.com/users/abom/received_events","type":"User","site_admin":false},"body":"Related: \r\n\r\n- our-city-app/oca-backend#162.\r\n- rogerthat-platform/rogerthat-kickserver#7\r\n- rogerthat-platform/rogerthat-android-client#110\r\n\r\nAlso #93.\r\n","created_at":"2017-02-13T15:21:08Z","updated_at":"2017-02-27T16:10:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae9899036f32efa96ae74f293937ac9b659ceb79","assignee":{"login":"RubenMattan","id":1122760,"avatar_url":"https://avatars.githubusercontent.com/u/1122760?v=3","gravatar_id":"","url":"https://api.github.com/users/RubenMattan","html_url":"https://github.com/RubenMattan","followers_url":"https://api.github.com/users/RubenMattan/followers","following_url":"https://api.github.com/users/RubenMattan/following{/other_user}","gists_url":"https://api.github.com/users/RubenMattan/gists{/gist_id}","starred_url":"https://api.github.com/users/RubenMattan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubenMattan/subscriptions","organizations_url":"https://api.github.com/users/RubenMattan/orgs","repos_url":"https://api.github.com/users/RubenMattan/repos","events_url":"https://api.github.com/users/RubenMattan/events{/privacy}","received_events_url":"https://api.github.com/users/RubenMattan/received_events","type":"User","site_admin":false},"assignees":[{"login":"RubenMattan","id":1122760,"avatar_url":"https://avatars.githubusercontent.com/u/1122760?v=3","gravatar_id":"","url":"https://api.github.com/users/RubenMattan","html_url":"https://github.com/RubenMattan","followers_url":"https://api.github.com/users/RubenMattan/followers","following_url":"https://api.github.com/users/RubenMattan/following{/other_user}","gists_url":"https://api.github.com/users/RubenMattan/gists{/gist_id}","starred_url":"https://api.github.com/users/RubenMattan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubenMattan/subscriptions","organizations_url":"https://api.github.com/users/RubenMattan/orgs","repos_url":"https://api.github.com/users/RubenMattan/repos","events_url":"https://api.github.com/users/RubenMattan/events{/privacy}","received_events_url":"https://api.github.com/users/RubenMattan/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/94/commits","review_comments_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/94/comments","review_comment_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues/94/comments","statuses_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/statuses/523bcb43b96c7de0f84a3729ad27977e725c0d2e","head":{"label":"rogerthat-platform:news_target_audience","ref":"news_target_audience","sha":"523bcb43b96c7de0f84a3729ad27977e725c0d2e","user":{"login":"rogerthat-platform","id":103897,"avatar_url":"https://avatars.githubusercontent.com/u/103897?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerthat-platform","html_url":"https://github.com/rogerthat-platform","followers_url":"https://api.github.com/users/rogerthat-platform/followers","following_url":"https://api.github.com/users/rogerthat-platform/following{/other_user}","gists_url":"https://api.github.com/users/rogerthat-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerthat-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerthat-platform/subscriptions","organizations_url":"https://api.github.com/users/rogerthat-platform/orgs","repos_url":"https://api.github.com/users/rogerthat-platform/repos","events_url":"https://api.github.com/users/rogerthat-platform/events{/privacy}","received_events_url":"https://api.github.com/users/rogerthat-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":58040014,"name":"rogerthat-backend","full_name":"rogerthat-platform/rogerthat-backend","owner":{"login":"rogerthat-platform","id":103897,"avatar_url":"https://avatars.githubusercontent.com/u/103897?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerthat-platform","html_url":"https://github.com/rogerthat-platform","followers_url":"https://api.github.com/users/rogerthat-platform/followers","following_url":"https://api.github.com/users/rogerthat-platform/following{/other_user}","gists_url":"https://api.github.com/users/rogerthat-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerthat-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerthat-platform/subscriptions","organizations_url":"https://api.github.com/users/rogerthat-platform/orgs","repos_url":"https://api.github.com/users/rogerthat-platform/repos","events_url":"https://api.github.com/users/rogerthat-platform/events{/privacy}","received_events_url":"https://api.github.com/users/rogerthat-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rogerthat-platform/rogerthat-backend","description":null,"fork":false,"url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend","forks_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/forks","keys_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/teams","hooks_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/hooks","issue_events_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues/events{/number}","events_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/events","assignees_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/assignees{/user}","branches_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/branches{/branch}","tags_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/tags","blobs_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/languages","stargazers_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/stargazers","contributors_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/contributors","subscribers_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/subscribers","subscription_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/subscription","commits_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/contents/{+path}","compare_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/merges","archive_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/downloads","issues_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues{/number}","pulls_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/labels{/name}","releases_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/releases{/id}","deployments_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/deployments","created_at":"2016-05-04T09:32:02Z","updated_at":"2016-12-06T14:12:58Z","pushed_at":"2017-02-27T13:46:51Z","git_url":"git://github.com/rogerthat-platform/rogerthat-backend.git","ssh_url":"git@github.com:rogerthat-platform/rogerthat-backend.git","clone_url":"https://github.com/rogerthat-platform/rogerthat-backend.git","svn_url":"https://github.com/rogerthat-platform/rogerthat-backend","homepage":null,"size":41679,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":47,"forks":1,"open_issues":47,"watchers":1,"default_branch":"master"}},"base":{"label":"rogerthat-platform:master","ref":"master","sha":"a93b4f3b008696bdbb0faead09efeb2d2746c8ec","user":{"login":"rogerthat-platform","id":103897,"avatar_url":"https://avatars.githubusercontent.com/u/103897?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerthat-platform","html_url":"https://github.com/rogerthat-platform","followers_url":"https://api.github.com/users/rogerthat-platform/followers","following_url":"https://api.github.com/users/rogerthat-platform/following{/other_user}","gists_url":"https://api.github.com/users/rogerthat-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerthat-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerthat-platform/subscriptions","organizations_url":"https://api.github.com/users/rogerthat-platform/orgs","repos_url":"https://api.github.com/users/rogerthat-platform/repos","events_url":"https://api.github.com/users/rogerthat-platform/events{/privacy}","received_events_url":"https://api.github.com/users/rogerthat-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":58040014,"name":"rogerthat-backend","full_name":"rogerthat-platform/rogerthat-backend","owner":{"login":"rogerthat-platform","id":103897,"avatar_url":"https://avatars.githubusercontent.com/u/103897?v=3","gravatar_id":"","url":"https://api.github.com/users/rogerthat-platform","html_url":"https://github.com/rogerthat-platform","followers_url":"https://api.github.com/users/rogerthat-platform/followers","following_url":"https://api.github.com/users/rogerthat-platform/following{/other_user}","gists_url":"https://api.github.com/users/rogerthat-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerthat-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerthat-platform/subscriptions","organizations_url":"https://api.github.com/users/rogerthat-platform/orgs","repos_url":"https://api.github.com/users/rogerthat-platform/repos","events_url":"https://api.github.com/users/rogerthat-platform/events{/privacy}","received_events_url":"https://api.github.com/users/rogerthat-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rogerthat-platform/rogerthat-backend","description":null,"fork":false,"url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend","forks_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/forks","keys_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/teams","hooks_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/hooks","issue_events_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues/events{/number}","events_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/events","assignees_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/assignees{/user}","branches_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/branches{/branch}","tags_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/tags","blobs_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/languages","stargazers_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/stargazers","contributors_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/contributors","subscribers_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/subscribers","subscription_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/subscription","commits_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/contents/{+path}","compare_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/merges","archive_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/downloads","issues_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues{/number}","pulls_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/labels{/name}","releases_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/releases{/id}","deployments_url":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/deployments","created_at":"2016-05-04T09:32:02Z","updated_at":"2016-12-06T14:12:58Z","pushed_at":"2017-02-27T13:46:51Z","git_url":"git://github.com/rogerthat-platform/rogerthat-backend.git","ssh_url":"git@github.com:rogerthat-platform/rogerthat-backend.git","clone_url":"https://github.com/rogerthat-platform/rogerthat-backend.git","svn_url":"https://github.com/rogerthat-platform/rogerthat-backend","homepage":null,"size":41679,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":47,"forks":1,"open_issues":47,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/94"},"html":{"href":"https://github.com/rogerthat-platform/rogerthat-backend/pull/94"},"issue":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues/94"},"comments":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/rogerthat-platform/rogerthat-backend/statuses/523bcb43b96c7de0f84a3729ad27977e725c0d2e"}}}}
{"actor":{"display_login":"RubenMattan"}}