{"action":"created","comment":{"url":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/comments/171280691","pull_request_review_id":100091979,"id":171280691,"diff_hunk":"@@ -149,3 +155,54 @@ def get_queryset(self):\n             Q(country__name__icontains=self.q) |\n             Q(address__person__name__icontains=self.q)\n         ).order_by('name', 'city', 'street_address')\n+\n+\n+class PersonMerge(FormView):\n+    form_class = PersonMergeForm\n+    template_name = 'people/merge_person.html'\n+\n+    def get_success_url(self):\n+        return reverse('admin:people_person_changelist')\n+\n+    def get_form_kwargs(self):\n+        form_kwargs = super(PersonMerge, self).get_form_kwargs()\n+        form_kwargs['person_ids'] = self.person_ids\n+        return form_kwargs\n+\n+    def get_initial(self):\n+        # default to first person selected (?)\n+        # _could_ add logic to select most complete record,\n+        # but probably better for team members to choose\n+        self.person_ids = [int(pid) for pid in self.request.GET.getlist('ids')]","path":"mep/people/views.py","position":38,"original_position":38,"commit_id":"3ca311b700d19be47eabad39df9be924388ed6b9","original_commit_id":"3ca311b700d19be47eabad39df9be924388ed6b9","user":{"login":"bwhicks","id":17815297,"avatar_url":"https://avatars2.githubusercontent.com/u/17815297?v=4","gravatar_id":"","url":"https://api.github.com/users/bwhicks","html_url":"https://github.com/bwhicks","followers_url":"https://api.github.com/users/bwhicks/followers","following_url":"https://api.github.com/users/bwhicks/following{/other_user}","gists_url":"https://api.github.com/users/bwhicks/gists{/gist_id}","starred_url":"https://api.github.com/users/bwhicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwhicks/subscriptions","organizations_url":"https://api.github.com/users/bwhicks/orgs","repos_url":"https://api.github.com/users/bwhicks/repos","events_url":"https://api.github.com/users/bwhicks/events{/privacy}","received_events_url":"https://api.github.com/users/bwhicks/received_events","type":"User","site_admin":false},"body":"I believe this is not working as it stands (having tested it and gotten a ValueError). `.getlist()` assumes that the querystring would be like `?ids=366&ids=365`, whereas this gets a single element list with a string that's `366,365` for example.","created_at":"2018-02-28T15:25:38Z","updated_at":"2018-02-28T15:29:26Z","html_url":"https://github.com/Princeton-CDH/mep-django/pull/73#discussion_r171280691","pull_request_url":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/73","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/comments/171280691"},"html":{"href":"https://github.com/Princeton-CDH/mep-django/pull/73#discussion_r171280691"},"pull_request":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/73"}}},"pull_request":{"url":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/73","id":171809307,"html_url":"https://github.com/Princeton-CDH/mep-django/pull/73","diff_url":"https://github.com/Princeton-CDH/mep-django/pull/73.diff","patch_url":"https://github.com/Princeton-CDH/mep-django/pull/73.patch","issue_url":"https://api.github.com/repos/Princeton-CDH/mep-django/issues/73","number":73,"state":"open","locked":false,"title":"Personography merge feature","user":{"login":"rlskoeser","id":691231,"avatar_url":"https://avatars2.githubusercontent.com/u/691231?v=4","gravatar_id":"","url":"https://api.github.com/users/rlskoeser","html_url":"https://github.com/rlskoeser","followers_url":"https://api.github.com/users/rlskoeser/followers","following_url":"https://api.github.com/users/rlskoeser/following{/other_user}","gists_url":"https://api.github.com/users/rlskoeser/gists{/gist_id}","starred_url":"https://api.github.com/users/rlskoeser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlskoeser/subscriptions","organizations_url":"https://api.github.com/users/rlskoeser/orgs","repos_url":"https://api.github.com/users/rlskoeser/repos","events_url":"https://api.github.com/users/rlskoeser/events{/privacy}","received_events_url":"https://api.github.com/users/rlskoeser/received_events","type":"User","site_admin":false},"body":"Custom admin action to merge duplicate people records in the personography.  Combines account and person data into the selected primary person record, and deletes the merged account and person records.  More details in #72.\r\n\r\nDoes not yet include tests for the merge view; but with the refactor to move the actual merge logic into a queryset method (which is now fully tested), that should be relatively straightforward.","created_at":"2018-02-27T22:56:49Z","updated_at":"2018-02-28T15:29:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5968545d17b218b850da567dbc393892ee2eb7a2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/73/commits","review_comments_url":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/73/comments","review_comment_url":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Princeton-CDH/mep-django/issues/73/comments","statuses_url":"https://api.github.com/repos/Princeton-CDH/mep-django/statuses/3ca311b700d19be47eabad39df9be924388ed6b9","head":{"label":"Princeton-CDH:feature/person-merge","ref":"feature/person-merge","sha":"3ca311b700d19be47eabad39df9be924388ed6b9","user":{"login":"Princeton-CDH","id":9663986,"avatar_url":"https://avatars2.githubusercontent.com/u/9663986?v=4","gravatar_id":"","url":"https://api.github.com/users/Princeton-CDH","html_url":"https://github.com/Princeton-CDH","followers_url":"https://api.github.com/users/Princeton-CDH/followers","following_url":"https://api.github.com/users/Princeton-CDH/following{/other_user}","gists_url":"https://api.github.com/users/Princeton-CDH/gists{/gist_id}","starred_url":"https://api.github.com/users/Princeton-CDH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Princeton-CDH/subscriptions","organizations_url":"https://api.github.com/users/Princeton-CDH/orgs","repos_url":"https://api.github.com/users/Princeton-CDH/repos","events_url":"https://api.github.com/users/Princeton-CDH/events{/privacy}","received_events_url":"https://api.github.com/users/Princeton-CDH/received_events","type":"Organization","site_admin":false},"repo":{"id":94891547,"name":"mep-django","full_name":"Princeton-CDH/mep-django","owner":{"login":"Princeton-CDH","id":9663986,"avatar_url":"https://avatars2.githubusercontent.com/u/9663986?v=4","gravatar_id":"","url":"https://api.github.com/users/Princeton-CDH","html_url":"https://github.com/Princeton-CDH","followers_url":"https://api.github.com/users/Princeton-CDH/followers","following_url":"https://api.github.com/users/Princeton-CDH/following{/other_user}","gists_url":"https://api.github.com/users/Princeton-CDH/gists{/gist_id}","starred_url":"https://api.github.com/users/Princeton-CDH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Princeton-CDH/subscriptions","organizations_url":"https://api.github.com/users/Princeton-CDH/orgs","repos_url":"https://api.github.com/users/Princeton-CDH/repos","events_url":"https://api.github.com/users/Princeton-CDH/events{/privacy}","received_events_url":"https://api.github.com/users/Princeton-CDH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Princeton-CDH/mep-django","description":"Django web application for the Mapping Expatriate Paris project","fork":false,"url":"https://api.github.com/repos/Princeton-CDH/mep-django","forks_url":"https://api.github.com/repos/Princeton-CDH/mep-django/forks","keys_url":"https://api.github.com/repos/Princeton-CDH/mep-django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Princeton-CDH/mep-django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Princeton-CDH/mep-django/teams","hooks_url":"https://api.github.com/repos/Princeton-CDH/mep-django/hooks","issue_events_url":"https://api.github.com/repos/Princeton-CDH/mep-django/issues/events{/number}","events_url":"https://api.github.com/repos/Princeton-CDH/mep-django/events","assignees_url":"https://api.github.com/repos/Princeton-CDH/mep-django/assignees{/user}","branches_url":"https://api.github.com/repos/Princeton-CDH/mep-django/branches{/branch}","tags_url":"https://api.github.com/repos/Princeton-CDH/mep-django/tags","blobs_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/refs{/sha}","trees_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Princeton-CDH/mep-django/statuses/{sha}","languages_url":"https://api.github.com/repos/Princeton-CDH/mep-django/languages","stargazers_url":"https://api.github.com/repos/Princeton-CDH/mep-django/stargazers","contributors_url":"https://api.github.com/repos/Princeton-CDH/mep-django/contributors","subscribers_url":"https://api.github.com/repos/Princeton-CDH/mep-django/subscribers","subscription_url":"https://api.github.com/repos/Princeton-CDH/mep-django/subscription","commits_url":"https://api.github.com/repos/Princeton-CDH/mep-django/commits{/sha}","git_commits_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/commits{/sha}","comments_url":"https://api.github.com/repos/Princeton-CDH/mep-django/comments{/number}","issue_comment_url":"https://api.github.com/repos/Princeton-CDH/mep-django/issues/comments{/number}","contents_url":"https://api.github.com/repos/Princeton-CDH/mep-django/contents/{+path}","compare_url":"https://api.github.com/repos/Princeton-CDH/mep-django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Princeton-CDH/mep-django/merges","archive_url":"https://api.github.com/repos/Princeton-CDH/mep-django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Princeton-CDH/mep-django/downloads","issues_url":"https://api.github.com/repos/Princeton-CDH/mep-django/issues{/number}","pulls_url":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls{/number}","milestones_url":"https://api.github.com/repos/Princeton-CDH/mep-django/milestones{/number}","notifications_url":"https://api.github.com/repos/Princeton-CDH/mep-django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Princeton-CDH/mep-django/labels{/name}","releases_url":"https://api.github.com/repos/Princeton-CDH/mep-django/releases{/id}","deployments_url":"https://api.github.com/repos/Princeton-CDH/mep-django/deployments","created_at":"2017-06-20T13:00:00Z","updated_at":"2018-02-26T17:18:57Z","pushed_at":"2018-02-27T22:56:50Z","git_url":"git://github.com/Princeton-CDH/mep-django.git","ssh_url":"git@github.com:Princeton-CDH/mep-django.git","clone_url":"https://github.com/Princeton-CDH/mep-django.git","svn_url":"https://github.com/Princeton-CDH/mep-django","homepage":"https://princeton-cdh.github.io/mep-django/","size":4298,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"Princeton-CDH:develop","ref":"develop","sha":"1c97c43c82502dfa10893ce91d7a08b305239cb6","user":{"login":"Princeton-CDH","id":9663986,"avatar_url":"https://avatars2.githubusercontent.com/u/9663986?v=4","gravatar_id":"","url":"https://api.github.com/users/Princeton-CDH","html_url":"https://github.com/Princeton-CDH","followers_url":"https://api.github.com/users/Princeton-CDH/followers","following_url":"https://api.github.com/users/Princeton-CDH/following{/other_user}","gists_url":"https://api.github.com/users/Princeton-CDH/gists{/gist_id}","starred_url":"https://api.github.com/users/Princeton-CDH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Princeton-CDH/subscriptions","organizations_url":"https://api.github.com/users/Princeton-CDH/orgs","repos_url":"https://api.github.com/users/Princeton-CDH/repos","events_url":"https://api.github.com/users/Princeton-CDH/events{/privacy}","received_events_url":"https://api.github.com/users/Princeton-CDH/received_events","type":"Organization","site_admin":false},"repo":{"id":94891547,"name":"mep-django","full_name":"Princeton-CDH/mep-django","owner":{"login":"Princeton-CDH","id":9663986,"avatar_url":"https://avatars2.githubusercontent.com/u/9663986?v=4","gravatar_id":"","url":"https://api.github.com/users/Princeton-CDH","html_url":"https://github.com/Princeton-CDH","followers_url":"https://api.github.com/users/Princeton-CDH/followers","following_url":"https://api.github.com/users/Princeton-CDH/following{/other_user}","gists_url":"https://api.github.com/users/Princeton-CDH/gists{/gist_id}","starred_url":"https://api.github.com/users/Princeton-CDH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Princeton-CDH/subscriptions","organizations_url":"https://api.github.com/users/Princeton-CDH/orgs","repos_url":"https://api.github.com/users/Princeton-CDH/repos","events_url":"https://api.github.com/users/Princeton-CDH/events{/privacy}","received_events_url":"https://api.github.com/users/Princeton-CDH/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Princeton-CDH/mep-django","description":"Django web application for the Mapping Expatriate Paris project","fork":false,"url":"https://api.github.com/repos/Princeton-CDH/mep-django","forks_url":"https://api.github.com/repos/Princeton-CDH/mep-django/forks","keys_url":"https://api.github.com/repos/Princeton-CDH/mep-django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Princeton-CDH/mep-django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Princeton-CDH/mep-django/teams","hooks_url":"https://api.github.com/repos/Princeton-CDH/mep-django/hooks","issue_events_url":"https://api.github.com/repos/Princeton-CDH/mep-django/issues/events{/number}","events_url":"https://api.github.com/repos/Princeton-CDH/mep-django/events","assignees_url":"https://api.github.com/repos/Princeton-CDH/mep-django/assignees{/user}","branches_url":"https://api.github.com/repos/Princeton-CDH/mep-django/branches{/branch}","tags_url":"https://api.github.com/repos/Princeton-CDH/mep-django/tags","blobs_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/refs{/sha}","trees_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Princeton-CDH/mep-django/statuses/{sha}","languages_url":"https://api.github.com/repos/Princeton-CDH/mep-django/languages","stargazers_url":"https://api.github.com/repos/Princeton-CDH/mep-django/stargazers","contributors_url":"https://api.github.com/repos/Princeton-CDH/mep-django/contributors","subscribers_url":"https://api.github.com/repos/Princeton-CDH/mep-django/subscribers","subscription_url":"https://api.github.com/repos/Princeton-CDH/mep-django/subscription","commits_url":"https://api.github.com/repos/Princeton-CDH/mep-django/commits{/sha}","git_commits_url":"https://api.github.com/repos/Princeton-CDH/mep-django/git/commits{/sha}","comments_url":"https://api.github.com/repos/Princeton-CDH/mep-django/comments{/number}","issue_comment_url":"https://api.github.com/repos/Princeton-CDH/mep-django/issues/comments{/number}","contents_url":"https://api.github.com/repos/Princeton-CDH/mep-django/contents/{+path}","compare_url":"https://api.github.com/repos/Princeton-CDH/mep-django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Princeton-CDH/mep-django/merges","archive_url":"https://api.github.com/repos/Princeton-CDH/mep-django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Princeton-CDH/mep-django/downloads","issues_url":"https://api.github.com/repos/Princeton-CDH/mep-django/issues{/number}","pulls_url":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls{/number}","milestones_url":"https://api.github.com/repos/Princeton-CDH/mep-django/milestones{/number}","notifications_url":"https://api.github.com/repos/Princeton-CDH/mep-django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Princeton-CDH/mep-django/labels{/name}","releases_url":"https://api.github.com/repos/Princeton-CDH/mep-django/releases{/id}","deployments_url":"https://api.github.com/repos/Princeton-CDH/mep-django/deployments","created_at":"2017-06-20T13:00:00Z","updated_at":"2018-02-26T17:18:57Z","pushed_at":"2018-02-27T22:56:50Z","git_url":"git://github.com/Princeton-CDH/mep-django.git","ssh_url":"git@github.com:Princeton-CDH/mep-django.git","clone_url":"https://github.com/Princeton-CDH/mep-django.git","svn_url":"https://github.com/Princeton-CDH/mep-django","homepage":"https://princeton-cdh.github.io/mep-django/","size":4298,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/73"},"html":{"href":"https://github.com/Princeton-CDH/mep-django/pull/73"},"issue":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/issues/73"},"comments":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/Princeton-CDH/mep-django/statuses/3ca311b700d19be47eabad39df9be924388ed6b9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bwhicks"}}