{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/22526965","id":22526965,"diff_hunk":"@@ -23,15 +22,12 @@ def ensure_default_manager(cls):\n         setattr(cls, 'objects', SwappedManagerDescriptor(cls))\n         return\n     if not getattr(cls, '_default_manager', None):\n-        # Create the default manager, if needed.\n-        try:\n-            cls._meta.get_field('objects')\n+        if any(f.name == 'objects' for f in cls._meta.fields):","path":"django/db/models/manager.py","position":15,"original_position":15,"commit_id":"afd9ccae65738d8ae6213fb1e7379e10531b14f5","original_commit_id":"afd9ccae65738d8ae6213fb1e7379e10531b14f5","user":{"login":"PirosB3","id":847179,"avatar_url":"https://avatars.githubusercontent.com/u/847179?v=3","gravatar_id":"","url":"https://api.github.com/users/PirosB3","html_url":"https://github.com/PirosB3","followers_url":"https://api.github.com/users/PirosB3/followers","following_url":"https://api.github.com/users/PirosB3/following{/other_user}","gists_url":"https://api.github.com/users/PirosB3/gists{/gist_id}","starred_url":"https://api.github.com/users/PirosB3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PirosB3/subscriptions","organizations_url":"https://api.github.com/users/PirosB3/orgs","repos_url":"https://api.github.com/users/PirosB3/repos","events_url":"https://api.github.com/users/PirosB3/events{/privacy}","received_events_url":"https://api.github.com/users/PirosB3/received_events","type":"User","site_admin":false},"body":"Good question: get_fields() necessarily warms the relation tree cache for everyone, we don’t want this to happen before the apps registry is ready.","created_at":"2015-01-06T15:09:55Z","updated_at":"2015-01-06T15:09:55Z","html_url":"https://github.com/django/django/pull/3114#discussion_r22526965","pull_request_url":"https://api.github.com/repos/django/django/pulls/3114","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/22526965"},"html":{"href":"https://github.com/django/django/pull/3114#discussion_r22526965"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/3114"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/3114","id":20220569,"html_url":"https://github.com/django/django/pull/3114","diff_url":"https://github.com/django/django/pull/3114.diff","patch_url":"https://github.com/django/django/pull/3114.patch","issue_url":"https://api.github.com/repos/django/django/issues/3114","number":3114,"state":"open","locked":false,"title":"[Soc2014] Official meta API","user":{"login":"PirosB3","id":847179,"avatar_url":"https://avatars.githubusercontent.com/u/847179?v=3","gravatar_id":"","url":"https://api.github.com/users/PirosB3","html_url":"https://github.com/PirosB3","followers_url":"https://api.github.com/users/PirosB3/followers","following_url":"https://api.github.com/users/PirosB3/following{/other_user}","gists_url":"https://api.github.com/users/PirosB3/gists{/gist_id}","starred_url":"https://api.github.com/users/PirosB3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PirosB3/subscriptions","organizations_url":"https://api.github.com/users/PirosB3/orgs","repos_url":"https://api.github.com/users/PirosB3/repos","events_url":"https://api.github.com/users/PirosB3/events{/privacy}","received_events_url":"https://api.github.com/users/PirosB3/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-24T15:04:36Z","updated_at":"2015-01-06T15:09:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9b0cfbb7b7c4f371cf4c49ee4ec3821978d4e7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/3114/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/3114/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments/{number}","comments_url":"https://api.github.com/repos/django/django/issues/3114/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/afd9ccae65738d8ae6213fb1e7379e10531b14f5","head":{"label":"PirosB3:soc2014_meta_refactor_upgrade_flags_get_field_tree","ref":"soc2014_meta_refactor_upgrade_flags_get_field_tree","sha":"afd9ccae65738d8ae6213fb1e7379e10531b14f5","user":{"login":"PirosB3","id":847179,"avatar_url":"https://avatars.githubusercontent.com/u/847179?v=3","gravatar_id":"","url":"https://api.github.com/users/PirosB3","html_url":"https://github.com/PirosB3","followers_url":"https://api.github.com/users/PirosB3/followers","following_url":"https://api.github.com/users/PirosB3/following{/other_user}","gists_url":"https://api.github.com/users/PirosB3/gists{/gist_id}","starred_url":"https://api.github.com/users/PirosB3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PirosB3/subscriptions","organizations_url":"https://api.github.com/users/PirosB3/orgs","repos_url":"https://api.github.com/users/PirosB3/repos","events_url":"https://api.github.com/users/PirosB3/events{/privacy}","received_events_url":"https://api.github.com/users/PirosB3/received_events","type":"User","site_admin":false},"repo":{"id":17481434,"name":"django","full_name":"PirosB3/django","owner":{"login":"PirosB3","id":847179,"avatar_url":"https://avatars.githubusercontent.com/u/847179?v=3","gravatar_id":"","url":"https://api.github.com/users/PirosB3","html_url":"https://github.com/PirosB3","followers_url":"https://api.github.com/users/PirosB3/followers","following_url":"https://api.github.com/users/PirosB3/following{/other_user}","gists_url":"https://api.github.com/users/PirosB3/gists{/gist_id}","starred_url":"https://api.github.com/users/PirosB3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PirosB3/subscriptions","organizations_url":"https://api.github.com/users/PirosB3/orgs","repos_url":"https://api.github.com/users/PirosB3/repos","events_url":"https://api.github.com/users/PirosB3/events{/privacy}","received_events_url":"https://api.github.com/users/PirosB3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PirosB3/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/PirosB3/django","forks_url":"https://api.github.com/repos/PirosB3/django/forks","keys_url":"https://api.github.com/repos/PirosB3/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PirosB3/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PirosB3/django/teams","hooks_url":"https://api.github.com/repos/PirosB3/django/hooks","issue_events_url":"https://api.github.com/repos/PirosB3/django/issues/events{/number}","events_url":"https://api.github.com/repos/PirosB3/django/events","assignees_url":"https://api.github.com/repos/PirosB3/django/assignees{/user}","branches_url":"https://api.github.com/repos/PirosB3/django/branches{/branch}","tags_url":"https://api.github.com/repos/PirosB3/django/tags","blobs_url":"https://api.github.com/repos/PirosB3/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PirosB3/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PirosB3/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/PirosB3/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PirosB3/django/statuses/{sha}","languages_url":"https://api.github.com/repos/PirosB3/django/languages","stargazers_url":"https://api.github.com/repos/PirosB3/django/stargazers","contributors_url":"https://api.github.com/repos/PirosB3/django/contributors","subscribers_url":"https://api.github.com/repos/PirosB3/django/subscribers","subscription_url":"https://api.github.com/repos/PirosB3/django/subscription","commits_url":"https://api.github.com/repos/PirosB3/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/PirosB3/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/PirosB3/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/PirosB3/django/issues/comments/{number}","contents_url":"https://api.github.com/repos/PirosB3/django/contents/{+path}","compare_url":"https://api.github.com/repos/PirosB3/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PirosB3/django/merges","archive_url":"https://api.github.com/repos/PirosB3/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PirosB3/django/downloads","issues_url":"https://api.github.com/repos/PirosB3/django/issues{/number}","pulls_url":"https://api.github.com/repos/PirosB3/django/pulls{/number}","milestones_url":"https://api.github.com/repos/PirosB3/django/milestones{/number}","notifications_url":"https://api.github.com/repos/PirosB3/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PirosB3/django/labels{/name}","releases_url":"https://api.github.com/repos/PirosB3/django/releases{/id}","created_at":"2014-03-06T15:01:29Z","updated_at":"2014-06-24T15:06:48Z","pushed_at":"2015-01-06T06:50:59Z","git_url":"git://github.com/PirosB3/django.git","ssh_url":"git@github.com:PirosB3/django.git","clone_url":"https://github.com/PirosB3/django.git","svn_url":"https://github.com/PirosB3/django","homepage":"http://www.djangoproject.com/","size":115178,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"de9ebdd39cb4f4b65475b43e0e32772d5a315654","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-01-06T12:25:06Z","pushed_at":"2015-01-06T08:00:50Z","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":238911,"stargazers_count":12472,"watchers_count":12472,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4880,"mirror_url":null,"open_issues_count":69,"forks":4880,"open_issues":69,"watchers":12472,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/3114"},"html":{"href":"https://github.com/django/django/pull/3114"},"issue":{"href":"https://api.github.com/repos/django/django/issues/3114"},"comments":{"href":"https://api.github.com/repos/django/django/issues/3114/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/3114/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/3114/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/afd9ccae65738d8ae6213fb1e7379e10531b14f5"}}}}