{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/24763459","id":24763459,"diff_hunk":"@@ -291,6 +291,8 @@ def add_field(self, field, virtual=False):\n         # self.many_to_many.\n         if virtual:\n             self.virtual_fields.append(field)\n+            if not hasattr(field, 'originating_model'):","path":"django/db/models/options.py","position":4,"original_position":4,"commit_id":"1588f0dcfc2f818c55bdedc69bfd8ae5f52edbb3","original_commit_id":"1588f0dcfc2f818c55bdedc69bfd8ae5f52edbb3","user":{"login":"carljm","id":61586,"avatar_url":"https://avatars.githubusercontent.com/u/61586?v=3","gravatar_id":"","url":"https://api.github.com/users/carljm","html_url":"https://github.com/carljm","followers_url":"https://api.github.com/users/carljm/followers","following_url":"https://api.github.com/users/carljm/following{/other_user}","gists_url":"https://api.github.com/users/carljm/gists{/gist_id}","starred_url":"https://api.github.com/users/carljm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carljm/subscriptions","organizations_url":"https://api.github.com/users/carljm/orgs","repos_url":"https://api.github.com/users/carljm/repos","events_url":"https://api.github.com/users/carljm/events{/privacy}","received_events_url":"https://api.github.com/users/carljm/received_events","type":"User","site_admin":false},"body":"I agree.","created_at":"2015-02-16T17:09:27Z","updated_at":"2015-02-16T17:09:27Z","html_url":"https://github.com/django/django/pull/4144#discussion_r24763459","pull_request_url":"https://api.github.com/repos/django/django/pulls/4144","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/24763459"},"html":{"href":"https://github.com/django/django/pull/4144#discussion_r24763459"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/4144"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/4144","id":29370301,"html_url":"https://github.com/django/django/pull/4144","diff_url":"https://github.com/django/django/pull/4144.diff","patch_url":"https://github.com/django/django/pull/4144.patch","issue_url":"https://api.github.com/repos/django/django/issues/4144","number":4144,"state":"open","locked":false,"title":"Fixed #24328 -- cleaned up _get_fields() implementation","user":{"login":"akaariai","id":125285,"avatar_url":"https://avatars.githubusercontent.com/u/125285?v=3","gravatar_id":"","url":"https://api.github.com/users/akaariai","html_url":"https://github.com/akaariai","followers_url":"https://api.github.com/users/akaariai/followers","following_url":"https://api.github.com/users/akaariai/following{/other_user}","gists_url":"https://api.github.com/users/akaariai/gists{/gist_id}","starred_url":"https://api.github.com/users/akaariai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akaariai/subscriptions","organizations_url":"https://api.github.com/users/akaariai/orgs","repos_url":"https://api.github.com/users/akaariai/repos","events_url":"https://api.github.com/users/akaariai/events{/privacy}","received_events_url":"https://api.github.com/users/akaariai/received_events","type":"User","site_admin":false},"body":"In addition to the cleanup, this patch does the following changes to\r\nthe meta API:\r\n  - proxy models have now always the exact same set of fields as their\r\n    parent models\r\n  - proxy model relations are now handled in _relation_tree\r\n  - the _relation_tree doesn't now return duplicate fields\r\n  - relations to proxy child models of the current models are now\r\n    returned in some cases where they weren't before\r\n    (include_parents=False). The include_parents flag was used in effect\r\n    to restrict including fields from *child* models.\r\n  - virtual fields now respect include_parents flag\r\n\r\nTo implement the last feature virtual fields now have originating_model\r\nattribute which tells the topmost non-abstract parent containing the\r\nfield.\r\n\r\nIn addition some minor cleanups were made.","created_at":"2015-02-16T12:45:09Z","updated_at":"2015-02-16T17:09:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52464b7accd7b1b4e97a75b4d447ee357c0ba739","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/4144/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/4144/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments/{number}","comments_url":"https://api.github.com/repos/django/django/issues/4144/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/1588f0dcfc2f818c55bdedc69bfd8ae5f52edbb3","head":{"label":"akaariai:meta_refactor","ref":"meta_refactor","sha":"1588f0dcfc2f818c55bdedc69bfd8ae5f52edbb3","user":{"login":"akaariai","id":125285,"avatar_url":"https://avatars.githubusercontent.com/u/125285?v=3","gravatar_id":"","url":"https://api.github.com/users/akaariai","html_url":"https://github.com/akaariai","followers_url":"https://api.github.com/users/akaariai/followers","following_url":"https://api.github.com/users/akaariai/following{/other_user}","gists_url":"https://api.github.com/users/akaariai/gists{/gist_id}","starred_url":"https://api.github.com/users/akaariai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akaariai/subscriptions","organizations_url":"https://api.github.com/users/akaariai/orgs","repos_url":"https://api.github.com/users/akaariai/repos","events_url":"https://api.github.com/users/akaariai/events{/privacy}","received_events_url":"https://api.github.com/users/akaariai/received_events","type":"User","site_admin":false},"repo":{"id":4170732,"name":"django","full_name":"akaariai/django","owner":{"login":"akaariai","id":125285,"avatar_url":"https://avatars.githubusercontent.com/u/125285?v=3","gravatar_id":"","url":"https://api.github.com/users/akaariai","html_url":"https://github.com/akaariai","followers_url":"https://api.github.com/users/akaariai/followers","following_url":"https://api.github.com/users/akaariai/following{/other_user}","gists_url":"https://api.github.com/users/akaariai/gists{/gist_id}","starred_url":"https://api.github.com/users/akaariai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akaariai/subscriptions","organizations_url":"https://api.github.com/users/akaariai/orgs","repos_url":"https://api.github.com/users/akaariai/repos","events_url":"https://api.github.com/users/akaariai/events{/privacy}","received_events_url":"https://api.github.com/users/akaariai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akaariai/django","description":"The Web framework for perfectionists with deadlines. Now on GitHub.","fork":true,"url":"https://api.github.com/repos/akaariai/django","forks_url":"https://api.github.com/repos/akaariai/django/forks","keys_url":"https://api.github.com/repos/akaariai/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akaariai/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akaariai/django/teams","hooks_url":"https://api.github.com/repos/akaariai/django/hooks","issue_events_url":"https://api.github.com/repos/akaariai/django/issues/events{/number}","events_url":"https://api.github.com/repos/akaariai/django/events","assignees_url":"https://api.github.com/repos/akaariai/django/assignees{/user}","branches_url":"https://api.github.com/repos/akaariai/django/branches{/branch}","tags_url":"https://api.github.com/repos/akaariai/django/tags","blobs_url":"https://api.github.com/repos/akaariai/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akaariai/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akaariai/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/akaariai/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akaariai/django/statuses/{sha}","languages_url":"https://api.github.com/repos/akaariai/django/languages","stargazers_url":"https://api.github.com/repos/akaariai/django/stargazers","contributors_url":"https://api.github.com/repos/akaariai/django/contributors","subscribers_url":"https://api.github.com/repos/akaariai/django/subscribers","subscription_url":"https://api.github.com/repos/akaariai/django/subscription","commits_url":"https://api.github.com/repos/akaariai/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/akaariai/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/akaariai/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/akaariai/django/issues/comments/{number}","contents_url":"https://api.github.com/repos/akaariai/django/contents/{+path}","compare_url":"https://api.github.com/repos/akaariai/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akaariai/django/merges","archive_url":"https://api.github.com/repos/akaariai/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akaariai/django/downloads","issues_url":"https://api.github.com/repos/akaariai/django/issues{/number}","pulls_url":"https://api.github.com/repos/akaariai/django/pulls{/number}","milestones_url":"https://api.github.com/repos/akaariai/django/milestones{/number}","notifications_url":"https://api.github.com/repos/akaariai/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akaariai/django/labels{/name}","releases_url":"https://api.github.com/repos/akaariai/django/releases{/id}","created_at":"2012-04-28T22:21:32Z","updated_at":"2014-06-14T10:49:41Z","pushed_at":"2015-02-16T12:47:33Z","git_url":"git://github.com/akaariai/django.git","ssh_url":"git@github.com:akaariai/django.git","clone_url":"https://github.com/akaariai/django.git","svn_url":"https://github.com/akaariai/django","homepage":"http://www.djangoproject.com/","size":106951,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":11,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"d652906aebd34d9ba943507ce0c3a7be169fab7c","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments/{number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","created_at":"2012-04-28T02:47:18Z","updated_at":"2015-02-16T16:53:17Z","pushed_at":"2015-02-16T16:15:40Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":257508,"stargazers_count":12943,"watchers_count":12943,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5044,"mirror_url":null,"open_issues_count":89,"forks":5044,"open_issues":89,"watchers":12943,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/4144"},"html":{"href":"https://github.com/django/django/pull/4144"},"issue":{"href":"https://api.github.com/repos/django/django/issues/4144"},"comments":{"href":"https://api.github.com/repos/django/django/issues/4144/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/4144/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/4144/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/1588f0dcfc2f818c55bdedc69bfd8ae5f52edbb3"}}}}