{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/39189281","id":39189281,"diff_hunk":"@@ -109,9 +109,8 @@ class BaseModelAdmin(six.with_metaclass(forms.MediaDefiningClass)):\n     show_full_result_count = True\n     checks_class = BaseModelAdminChecks\n \n-    @classmethod\n-    def check(cls, model, **kwargs):\n-        return cls.checks_class().check(cls, model, **kwargs)\n+    def check(self, **kwargs):\n+        return self.checks_class().check(self, **kwargs)","path":"django/contrib/admin/options.py","position":8,"original_position":8,"commit_id":"0a7388c91eabbf65093a3a91629216c0ad9ebde7","original_commit_id":"0a7388c91eabbf65093a3a91629216c0ad9ebde7","user":{"login":"charettes","id":9293,"avatar_url":"https://avatars.githubusercontent.com/u/9293?v=3","gravatar_id":"","url":"https://api.github.com/users/charettes","html_url":"https://github.com/charettes","followers_url":"https://api.github.com/users/charettes/followers","following_url":"https://api.github.com/users/charettes/following{/other_user}","gists_url":"https://api.github.com/users/charettes/gists{/gist_id}","starred_url":"https://api.github.com/users/charettes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charettes/subscriptions","organizations_url":"https://api.github.com/users/charettes/orgs","repos_url":"https://api.github.com/users/charettes/repos","events_url":"https://api.github.com/users/charettes/events{/privacy}","received_events_url":"https://api.github.com/users/charettes/received_events","type":"User","site_admin":false},"body":"My main argument for running checks against `ModelAdmin` instances was that they needed to be bound to a `model` to make any sense. I just realized `InlineModelAdmin` checks also require reference to a `parent_model` so I guess checks should also be run against instances here to. I retract my comment.","created_at":"2015-09-10T17:39:27Z","updated_at":"2015-09-10T17:39:27Z","html_url":"https://github.com/django/django/pull/5256#discussion_r39189281","pull_request_url":"https://api.github.com/repos/django/django/pulls/5256","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/39189281"},"html":{"href":"https://github.com/django/django/pull/5256#discussion_r39189281"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/5256"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/5256","id":44665367,"html_url":"https://github.com/django/django/pull/5256","diff_url":"https://github.com/django/django/pull/5256.diff","patch_url":"https://github.com/django/django/pull/5256.patch","issue_url":"https://api.github.com/repos/django/django/issues/5256","number":5256,"state":"open","locked":false,"title":"Fixed #25374 -- Run ModelAdmin checks on instance not on class","user":{"login":"mbox","id":85581,"avatar_url":"https://avatars.githubusercontent.com/u/85581?v=3","gravatar_id":"","url":"https://api.github.com/users/mbox","html_url":"https://github.com/mbox","followers_url":"https://api.github.com/users/mbox/followers","following_url":"https://api.github.com/users/mbox/following{/other_user}","gists_url":"https://api.github.com/users/mbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbox/subscriptions","organizations_url":"https://api.github.com/users/mbox/orgs","repos_url":"https://api.github.com/users/mbox/repos","events_url":"https://api.github.com/users/mbox/events{/privacy}","received_events_url":"https://api.github.com/users/mbox/received_events","type":"User","site_admin":false},"body":"Changes checks.py to work on an instance of a ModelAdmin rather than\r\nthe class, so that valid dynamically-generated attributes don't trigger\r\nchecks.","created_at":"2015-09-10T13:11:20Z","updated_at":"2015-09-10T17:39:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6b8c48ae3df741c7ef33c3f983e6fdfd5f66552","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/5256/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/5256/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/5256/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/0a7388c91eabbf65093a3a91629216c0ad9ebde7","head":{"label":"mbox:ticket_25374","ref":"ticket_25374","sha":"0a7388c91eabbf65093a3a91629216c0ad9ebde7","user":{"login":"mbox","id":85581,"avatar_url":"https://avatars.githubusercontent.com/u/85581?v=3","gravatar_id":"","url":"https://api.github.com/users/mbox","html_url":"https://github.com/mbox","followers_url":"https://api.github.com/users/mbox/followers","following_url":"https://api.github.com/users/mbox/following{/other_user}","gists_url":"https://api.github.com/users/mbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbox/subscriptions","organizations_url":"https://api.github.com/users/mbox/orgs","repos_url":"https://api.github.com/users/mbox/repos","events_url":"https://api.github.com/users/mbox/events{/privacy}","received_events_url":"https://api.github.com/users/mbox/received_events","type":"User","site_admin":false},"repo":{"id":18037558,"name":"django","full_name":"mbox/django","owner":{"login":"mbox","id":85581,"avatar_url":"https://avatars.githubusercontent.com/u/85581?v=3","gravatar_id":"","url":"https://api.github.com/users/mbox","html_url":"https://github.com/mbox","followers_url":"https://api.github.com/users/mbox/followers","following_url":"https://api.github.com/users/mbox/following{/other_user}","gists_url":"https://api.github.com/users/mbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbox/subscriptions","organizations_url":"https://api.github.com/users/mbox/orgs","repos_url":"https://api.github.com/users/mbox/repos","events_url":"https://api.github.com/users/mbox/events{/privacy}","received_events_url":"https://api.github.com/users/mbox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbox/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/mbox/django","forks_url":"https://api.github.com/repos/mbox/django/forks","keys_url":"https://api.github.com/repos/mbox/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbox/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbox/django/teams","hooks_url":"https://api.github.com/repos/mbox/django/hooks","issue_events_url":"https://api.github.com/repos/mbox/django/issues/events{/number}","events_url":"https://api.github.com/repos/mbox/django/events","assignees_url":"https://api.github.com/repos/mbox/django/assignees{/user}","branches_url":"https://api.github.com/repos/mbox/django/branches{/branch}","tags_url":"https://api.github.com/repos/mbox/django/tags","blobs_url":"https://api.github.com/repos/mbox/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbox/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbox/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbox/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbox/django/statuses/{sha}","languages_url":"https://api.github.com/repos/mbox/django/languages","stargazers_url":"https://api.github.com/repos/mbox/django/stargazers","contributors_url":"https://api.github.com/repos/mbox/django/contributors","subscribers_url":"https://api.github.com/repos/mbox/django/subscribers","subscription_url":"https://api.github.com/repos/mbox/django/subscription","commits_url":"https://api.github.com/repos/mbox/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbox/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbox/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbox/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbox/django/contents/{+path}","compare_url":"https://api.github.com/repos/mbox/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbox/django/merges","archive_url":"https://api.github.com/repos/mbox/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbox/django/downloads","issues_url":"https://api.github.com/repos/mbox/django/issues{/number}","pulls_url":"https://api.github.com/repos/mbox/django/pulls{/number}","milestones_url":"https://api.github.com/repos/mbox/django/milestones{/number}","notifications_url":"https://api.github.com/repos/mbox/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbox/django/labels{/name}","releases_url":"https://api.github.com/repos/mbox/django/releases{/id}","created_at":"2014-03-23T16:24:12Z","updated_at":"2015-03-10T00:45:01Z","pushed_at":"2015-09-10T17:19:30Z","git_url":"git://github.com/mbox/django.git","ssh_url":"git@github.com:mbox/django.git","clone_url":"https://github.com/mbox/django.git","svn_url":"https://github.com/mbox/django","homepage":"http://www.djangoproject.com/","size":99106,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"acb833081dd3abca3bc62753103690f23fb3f0ec","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-09-10T14:38:53Z","pushed_at":"2015-09-10T17:26: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":309935,"stargazers_count":15890,"watchers_count":15890,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6384,"mirror_url":null,"open_issues_count":65,"forks":6384,"open_issues":65,"watchers":15890,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/5256"},"html":{"href":"https://github.com/django/django/pull/5256"},"issue":{"href":"https://api.github.com/repos/django/django/issues/5256"},"comments":{"href":"https://api.github.com/repos/django/django/issues/5256/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/5256/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/5256/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/0a7388c91eabbf65093a3a91629216c0ad9ebde7"}}}}