GitHub PullRequestReviewCommentEvent at 2014-11-18 11:35:39
Repository: cla_backend
Actor: andyhd
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/comments/20499867","id":20499867,"diff_hunk":"@@ -54,6 +55,36 @@ class Meta:\n         model = Feedback\n         fields = ()\n \n+\n+\n+class CSVUploadSerializerBase(serializers.ModelSerializer):\n+\n+    rows = serializers.SerializerMethodField('get_rows')\n+    provider = serializers.CharField(read_only=True, source='provider.name')\n+    created_by = serializers.CharField(read_only=True, source='created_by.user.username')\n+    body = JSONField()\n+\n+    def get_rows(self, obj):\n+        return len(obj.body)\n+\n+    def validate_month(self, attrs, source):\n+        value = attrs[source]\n+        if value.day != 1:","path":"cla_backend/apps/legalaid/serializers.py","position":38,"original_position":38,"commit_id":"ecda5a2b8bacc0a92acf0a799307ce55106321a2","original_commit_id":"ecda5a2b8bacc0a92acf0a799307ce55106321a2","user":{"login":"andyhd","id":35194,"avatar_url":"https://avatars.githubusercontent.com/u/35194?v=3","gravatar_id":"","url":"https://api.github.com/users/andyhd","html_url":"https://github.com/andyhd","followers_url":"https://api.github.com/users/andyhd/followers","following_url":"https://api.github.com/users/andyhd/following{/other_user}","gists_url":"https://api.github.com/users/andyhd/gists{/gist_id}","starred_url":"https://api.github.com/users/andyhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyhd/subscriptions","organizations_url":"https://api.github.com/users/andyhd/orgs","repos_url":"https://api.github.com/users/andyhd/repos","events_url":"https://api.github.com/users/andyhd/events{/privacy}","received_events_url":"https://api.github.com/users/andyhd/received_events","type":"User","site_admin":false},"body":"the logic is simple, but you are repeating yourself by checking `value.day != 1`","created_at":"2014-11-18T11:35:39Z","updated_at":"2014-11-18T11:35:39Z","html_url":"https://github.com/ministryofjustice/cla_backend/pull/225#discussion_r20499867","pull_request_url":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/225","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/comments/20499867"},"html":{"href":"https://github.com/ministryofjustice/cla_backend/pull/225#discussion_r20499867"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/225"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/225","id":24552116,"html_url":"https://github.com/ministryofjustice/cla_backend/pull/225","diff_url":"https://github.com/ministryofjustice/cla_backend/pull/225.diff","patch_url":"https://github.com/ministryofjustice/cla_backend/pull/225.patch","issue_url":"https://api.github.com/repos/ministryofjustice/cla_backend/issues/225","number":225,"state":"closed","locked":false,"title":"Provider CSV Upload feature","user":{"login":"r4vi","id":565628,"avatar_url":"https://avatars.githubusercontent.com/u/565628?v=3","gravatar_id":"","url":"https://api.github.com/users/r4vi","html_url":"https://github.com/r4vi","followers_url":"https://api.github.com/users/r4vi/followers","following_url":"https://api.github.com/users/r4vi/following{/other_user}","gists_url":"https://api.github.com/users/r4vi/gists{/gist_id}","starred_url":"https://api.github.com/users/r4vi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r4vi/subscriptions","organizations_url":"https://api.github.com/users/r4vi/orgs","repos_url":"https://api.github.com/users/r4vi/repos","events_url":"https://api.github.com/users/r4vi/events{/privacy}","received_events_url":"https://api.github.com/users/r4vi/received_events","type":"User","site_admin":false},"body":"with minimal business spec validation","created_at":"2014-11-17T17:32:45Z","updated_at":"2014-11-18T11:35:39Z","closed_at":"2014-11-17T17:42:16Z","merged_at":"2014-11-17T17:42:16Z","merge_commit_sha":"54e513456f25d3c88c114b8a2f64a0c29dac6929","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/225/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/225/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ministryofjustice/cla_backend/issues/225/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/cla_backend/statuses/ecda5a2b8bacc0a92acf0a799307ce55106321a2","head":{"label":"ministryofjustice:feature/csvupload-backend","ref":"feature/csvupload-backend","sha":"ecda5a2b8bacc0a92acf0a799307ce55106321a2","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":16694400,"name":"cla_backend","full_name":"ministryofjustice/cla_backend","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/cla_backend","description":"CLA Back End","fork":false,"url":"https://api.github.com/repos/ministryofjustice/cla_backend","forks_url":"https://api.github.com/repos/ministryofjustice/cla_backend/forks","keys_url":"https://api.github.com/repos/ministryofjustice/cla_backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/cla_backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/cla_backend/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/cla_backend/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/cla_backend/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/cla_backend/events","assignees_url":"https://api.github.com/repos/ministryofjustice/cla_backend/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/cla_backend/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/cla_backend/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/cla_backend/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/cla_backend/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/cla_backend/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/cla_backend/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/cla_backend/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/cla_backend/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/cla_backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/cla_backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/cla_backend/issues/comments/{number}","contents_url":"https://api.github.com/repos/ministryofjustice/cla_backend/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/cla_backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/cla_backend/merges","archive_url":"https://api.github.com/repos/ministryofjustice/cla_backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/cla_backend/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/cla_backend/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/cla_backend/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/cla_backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/cla_backend/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/cla_backend/releases{/id}","created_at":"2014-02-10T12:20:03Z","updated_at":"2014-10-27T17:03:39Z","pushed_at":"2014-11-18T11:00:43Z","git_url":"git://github.com/ministryofjustice/cla_backend.git","ssh_url":"git@github.com:ministryofjustice/cla_backend.git","clone_url":"https://github.com/ministryofjustice/cla_backend.git","svn_url":"https://github.com/ministryofjustice/cla_backend","homepage":null,"size":8825,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ministryofjustice:develop","ref":"develop","sha":"6460763ca59ef3165d9c460a4a3959c0f8de39ab","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":16694400,"name":"cla_backend","full_name":"ministryofjustice/cla_backend","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/cla_backend","description":"CLA Back End","fork":false,"url":"https://api.github.com/repos/ministryofjustice/cla_backend","forks_url":"https://api.github.com/repos/ministryofjustice/cla_backend/forks","keys_url":"https://api.github.com/repos/ministryofjustice/cla_backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/cla_backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/cla_backend/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/cla_backend/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/cla_backend/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/cla_backend/events","assignees_url":"https://api.github.com/repos/ministryofjustice/cla_backend/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/cla_backend/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/cla_backend/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/cla_backend/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/cla_backend/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/cla_backend/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/cla_backend/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/cla_backend/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/cla_backend/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/cla_backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/cla_backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/cla_backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/cla_backend/issues/comments/{number}","contents_url":"https://api.github.com/repos/ministryofjustice/cla_backend/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/cla_backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/cla_backend/merges","archive_url":"https://api.github.com/repos/ministryofjustice/cla_backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/cla_backend/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/cla_backend/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/cla_backend/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/cla_backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/cla_backend/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/cla_backend/releases{/id}","created_at":"2014-02-10T12:20:03Z","updated_at":"2014-10-27T17:03:39Z","pushed_at":"2014-11-18T11:00:43Z","git_url":"git://github.com/ministryofjustice/cla_backend.git","ssh_url":"git@github.com:ministryofjustice/cla_backend.git","clone_url":"https://github.com/ministryofjustice/cla_backend.git","svn_url":"https://github.com/ministryofjustice/cla_backend","homepage":null,"size":8825,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/225"},"html":{"href":"https://github.com/ministryofjustice/cla_backend/pull/225"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/issues/225"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/issues/225/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/225/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/pulls/225/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/cla_backend/statuses/ecda5a2b8bacc0a92acf0a799307ce55106321a2"}}}}