{"action":"created","comment":{"url":"https://api.github.com/repos/FUUK/fuuk/pulls/comments/79654103","id":79654103,"diff_hunk":"@@ -0,0 +1,81 @@\n+# -*- coding: utf-8 -*-\n+from __future__ import unicode_literals\n+\n+from django.db import migrations\n+\n+\n+def move_author_person_to_grant(apps, schema_editor):\n+    # We can't import the Person model directly as it may be a newer\n+    # version than this migration expects. We use the historical version.\n+    Grant = apps.get_model(\"people\", \"Grant\")\n+    Institution = apps.get_model(\"people\", \"Institution\")\n+    for grant in Grant.objects.all():\n+        grant.investigator_prefix = grant.author.prefix\n+        grant.investigator_first_name = grant.author.first_name\n+        grant.investigator_last_name = grant.author.last_name\n+        grant.investigator_suffix = grant.author.suffix\n+        if grant.author.human:\n+            human = grant.author.human\n+            grant.investigator_human = human\n+\n+        places = grant.author.place\n+        if places.exists() and not grant.author.type:\n+            place = places.order_by('id')[0]","path":"fuuk/people/migrations/0004_refactor_grants_data_migration.py","position":null,"original_position":23,"commit_id":"d1829d97c54be19ef81eced9468c55aa9d370333","original_commit_id":"e87c09191321b9a60a4490ebe37552ba653c92c9","user":{"login":"lumik","id":443945,"avatar_url":"https://avatars.githubusercontent.com/u/443945?v=3","gravatar_id":"","url":"https://api.github.com/users/lumik","html_url":"https://github.com/lumik","followers_url":"https://api.github.com/users/lumik/followers","following_url":"https://api.github.com/users/lumik/following{/other_user}","gists_url":"https://api.github.com/users/lumik/gists{/gist_id}","starred_url":"https://api.github.com/users/lumik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lumik/subscriptions","organizations_url":"https://api.github.com/users/lumik/orgs","repos_url":"https://api.github.com/users/lumik/repos","events_url":"https://api.github.com/users/lumik/events{/privacy}","received_events_url":"https://api.github.com/users/lumik/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2016-09-20T16:31:08Z","updated_at":"2016-09-20T16:31:08Z","html_url":"https://github.com/FUUK/fuuk/pull/101#discussion_r79654103","pull_request_url":"https://api.github.com/repos/FUUK/fuuk/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/FUUK/fuuk/pulls/comments/79654103"},"html":{"href":"https://github.com/FUUK/fuuk/pull/101#discussion_r79654103"},"pull_request":{"href":"https://api.github.com/repos/FUUK/fuuk/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/FUUK/fuuk/pulls/101","id":74790737,"html_url":"https://github.com/FUUK/fuuk/pull/101","diff_url":"https://github.com/FUUK/fuuk/pull/101.diff","patch_url":"https://github.com/FUUK/fuuk/pull/101.patch","issue_url":"https://api.github.com/repos/FUUK/fuuk/issues/101","number":101,"state":"open","locked":false,"title":"Fixes #71: Refactor Grant authors","user":{"login":"lumik","id":443945,"avatar_url":"https://avatars.githubusercontent.com/u/443945?v=3","gravatar_id":"","url":"https://api.github.com/users/lumik","html_url":"https://github.com/lumik","followers_url":"https://api.github.com/users/lumik/followers","following_url":"https://api.github.com/users/lumik/following{/other_user}","gists_url":"https://api.github.com/users/lumik/gists{/gist_id}","starred_url":"https://api.github.com/users/lumik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lumik/subscriptions","organizations_url":"https://api.github.com/users/lumik/orgs","repos_url":"https://api.github.com/users/lumik/repos","events_url":"https://api.github.com/users/lumik/events{/privacy}","received_events_url":"https://api.github.com/users/lumik/received_events","type":"User","site_admin":false},"body":"Close #71.","created_at":"2016-06-22T14:09:49Z","updated_at":"2016-09-20T16:31:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a87fbd68f0a9973c792b268b4ced286ec76e1ee4","assignee":{"login":"lumik","id":443945,"avatar_url":"https://avatars.githubusercontent.com/u/443945?v=3","gravatar_id":"","url":"https://api.github.com/users/lumik","html_url":"https://github.com/lumik","followers_url":"https://api.github.com/users/lumik/followers","following_url":"https://api.github.com/users/lumik/following{/other_user}","gists_url":"https://api.github.com/users/lumik/gists{/gist_id}","starred_url":"https://api.github.com/users/lumik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lumik/subscriptions","organizations_url":"https://api.github.com/users/lumik/orgs","repos_url":"https://api.github.com/users/lumik/repos","events_url":"https://api.github.com/users/lumik/events{/privacy}","received_events_url":"https://api.github.com/users/lumik/received_events","type":"User","site_admin":false},"assignees":[{"login":"lumik","id":443945,"avatar_url":"https://avatars.githubusercontent.com/u/443945?v=3","gravatar_id":"","url":"https://api.github.com/users/lumik","html_url":"https://github.com/lumik","followers_url":"https://api.github.com/users/lumik/followers","following_url":"https://api.github.com/users/lumik/following{/other_user}","gists_url":"https://api.github.com/users/lumik/gists{/gist_id}","starred_url":"https://api.github.com/users/lumik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lumik/subscriptions","organizations_url":"https://api.github.com/users/lumik/orgs","repos_url":"https://api.github.com/users/lumik/repos","events_url":"https://api.github.com/users/lumik/events{/privacy}","received_events_url":"https://api.github.com/users/lumik/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/FUUK/fuuk/milestones/11","html_url":"https://github.com/FUUK/fuuk/milestones/0.15","labels_url":"https://api.github.com/repos/FUUK/fuuk/milestones/11/labels","id":1988608,"number":11,"title":"0.15","description":"","creator":{"login":"ziima","id":331955,"avatar_url":"https://avatars.githubusercontent.com/u/331955?v=3","gravatar_id":"","url":"https://api.github.com/users/ziima","html_url":"https://github.com/ziima","followers_url":"https://api.github.com/users/ziima/followers","following_url":"https://api.github.com/users/ziima/following{/other_user}","gists_url":"https://api.github.com/users/ziima/gists{/gist_id}","starred_url":"https://api.github.com/users/ziima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziima/subscriptions","organizations_url":"https://api.github.com/users/ziima/orgs","repos_url":"https://api.github.com/users/ziima/repos","events_url":"https://api.github.com/users/ziima/events{/privacy}","received_events_url":"https://api.github.com/users/ziima/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":0,"state":"open","created_at":"2016-09-07T11:51:35Z","updated_at":"2016-09-20T12:08:27Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/FUUK/fuuk/pulls/101/commits","review_comments_url":"https://api.github.com/repos/FUUK/fuuk/pulls/101/comments","review_comment_url":"https://api.github.com/repos/FUUK/fuuk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FUUK/fuuk/issues/101/comments","statuses_url":"https://api.github.com/repos/FUUK/fuuk/statuses/d1829d97c54be19ef81eced9468c55aa9d370333","head":{"label":"FUUK:71_refactor_grant_authors","ref":"71_refactor_grant_authors","sha":"d1829d97c54be19ef81eced9468c55aa9d370333","user":{"login":"FUUK","id":6593947,"avatar_url":"https://avatars.githubusercontent.com/u/6593947?v=3","gravatar_id":"","url":"https://api.github.com/users/FUUK","html_url":"https://github.com/FUUK","followers_url":"https://api.github.com/users/FUUK/followers","following_url":"https://api.github.com/users/FUUK/following{/other_user}","gists_url":"https://api.github.com/users/FUUK/gists{/gist_id}","starred_url":"https://api.github.com/users/FUUK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FUUK/subscriptions","organizations_url":"https://api.github.com/users/FUUK/orgs","repos_url":"https://api.github.com/users/FUUK/repos","events_url":"https://api.github.com/users/FUUK/events{/privacy}","received_events_url":"https://api.github.com/users/FUUK/received_events","type":"Organization","site_admin":false},"repo":{"id":1008705,"name":"fuuk","full_name":"FUUK/fuuk","owner":{"login":"FUUK","id":6593947,"avatar_url":"https://avatars.githubusercontent.com/u/6593947?v=3","gravatar_id":"","url":"https://api.github.com/users/FUUK","html_url":"https://github.com/FUUK","followers_url":"https://api.github.com/users/FUUK/followers","following_url":"https://api.github.com/users/FUUK/following{/other_user}","gists_url":"https://api.github.com/users/FUUK/gists{/gist_id}","starred_url":"https://api.github.com/users/FUUK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FUUK/subscriptions","organizations_url":"https://api.github.com/users/FUUK/orgs","repos_url":"https://api.github.com/users/FUUK/repos","events_url":"https://api.github.com/users/FUUK/events{/privacy}","received_events_url":"https://api.github.com/users/FUUK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FUUK/fuuk","description":"Web of FÚUK","fork":false,"url":"https://api.github.com/repos/FUUK/fuuk","forks_url":"https://api.github.com/repos/FUUK/fuuk/forks","keys_url":"https://api.github.com/repos/FUUK/fuuk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FUUK/fuuk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FUUK/fuuk/teams","hooks_url":"https://api.github.com/repos/FUUK/fuuk/hooks","issue_events_url":"https://api.github.com/repos/FUUK/fuuk/issues/events{/number}","events_url":"https://api.github.com/repos/FUUK/fuuk/events","assignees_url":"https://api.github.com/repos/FUUK/fuuk/assignees{/user}","branches_url":"https://api.github.com/repos/FUUK/fuuk/branches{/branch}","tags_url":"https://api.github.com/repos/FUUK/fuuk/tags","blobs_url":"https://api.github.com/repos/FUUK/fuuk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FUUK/fuuk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FUUK/fuuk/git/refs{/sha}","trees_url":"https://api.github.com/repos/FUUK/fuuk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FUUK/fuuk/statuses/{sha}","languages_url":"https://api.github.com/repos/FUUK/fuuk/languages","stargazers_url":"https://api.github.com/repos/FUUK/fuuk/stargazers","contributors_url":"https://api.github.com/repos/FUUK/fuuk/contributors","subscribers_url":"https://api.github.com/repos/FUUK/fuuk/subscribers","subscription_url":"https://api.github.com/repos/FUUK/fuuk/subscription","commits_url":"https://api.github.com/repos/FUUK/fuuk/commits{/sha}","git_commits_url":"https://api.github.com/repos/FUUK/fuuk/git/commits{/sha}","comments_url":"https://api.github.com/repos/FUUK/fuuk/comments{/number}","issue_comment_url":"https://api.github.com/repos/FUUK/fuuk/issues/comments{/number}","contents_url":"https://api.github.com/repos/FUUK/fuuk/contents/{+path}","compare_url":"https://api.github.com/repos/FUUK/fuuk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FUUK/fuuk/merges","archive_url":"https://api.github.com/repos/FUUK/fuuk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FUUK/fuuk/downloads","issues_url":"https://api.github.com/repos/FUUK/fuuk/issues{/number}","pulls_url":"https://api.github.com/repos/FUUK/fuuk/pulls{/number}","milestones_url":"https://api.github.com/repos/FUUK/fuuk/milestones{/number}","notifications_url":"https://api.github.com/repos/FUUK/fuuk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FUUK/fuuk/labels{/name}","releases_url":"https://api.github.com/repos/FUUK/fuuk/releases{/id}","deployments_url":"https://api.github.com/repos/FUUK/fuuk/deployments","created_at":"2010-10-20T10:22:58Z","updated_at":"2016-03-23T07:36:34Z","pushed_at":"2016-09-20T16:27:59Z","git_url":"git://github.com/FUUK/fuuk.git","ssh_url":"git@github.com:FUUK/fuuk.git","clone_url":"https://github.com/FUUK/fuuk.git","svn_url":"https://github.com/FUUK/fuuk","homepage":"","size":728,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":3,"default_branch":"master"}},"base":{"label":"FUUK:master","ref":"master","sha":"91ab684b8a52f2facfeed9614b877fd1b6d89aef","user":{"login":"FUUK","id":6593947,"avatar_url":"https://avatars.githubusercontent.com/u/6593947?v=3","gravatar_id":"","url":"https://api.github.com/users/FUUK","html_url":"https://github.com/FUUK","followers_url":"https://api.github.com/users/FUUK/followers","following_url":"https://api.github.com/users/FUUK/following{/other_user}","gists_url":"https://api.github.com/users/FUUK/gists{/gist_id}","starred_url":"https://api.github.com/users/FUUK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FUUK/subscriptions","organizations_url":"https://api.github.com/users/FUUK/orgs","repos_url":"https://api.github.com/users/FUUK/repos","events_url":"https://api.github.com/users/FUUK/events{/privacy}","received_events_url":"https://api.github.com/users/FUUK/received_events","type":"Organization","site_admin":false},"repo":{"id":1008705,"name":"fuuk","full_name":"FUUK/fuuk","owner":{"login":"FUUK","id":6593947,"avatar_url":"https://avatars.githubusercontent.com/u/6593947?v=3","gravatar_id":"","url":"https://api.github.com/users/FUUK","html_url":"https://github.com/FUUK","followers_url":"https://api.github.com/users/FUUK/followers","following_url":"https://api.github.com/users/FUUK/following{/other_user}","gists_url":"https://api.github.com/users/FUUK/gists{/gist_id}","starred_url":"https://api.github.com/users/FUUK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FUUK/subscriptions","organizations_url":"https://api.github.com/users/FUUK/orgs","repos_url":"https://api.github.com/users/FUUK/repos","events_url":"https://api.github.com/users/FUUK/events{/privacy}","received_events_url":"https://api.github.com/users/FUUK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FUUK/fuuk","description":"Web of FÚUK","fork":false,"url":"https://api.github.com/repos/FUUK/fuuk","forks_url":"https://api.github.com/repos/FUUK/fuuk/forks","keys_url":"https://api.github.com/repos/FUUK/fuuk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FUUK/fuuk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FUUK/fuuk/teams","hooks_url":"https://api.github.com/repos/FUUK/fuuk/hooks","issue_events_url":"https://api.github.com/repos/FUUK/fuuk/issues/events{/number}","events_url":"https://api.github.com/repos/FUUK/fuuk/events","assignees_url":"https://api.github.com/repos/FUUK/fuuk/assignees{/user}","branches_url":"https://api.github.com/repos/FUUK/fuuk/branches{/branch}","tags_url":"https://api.github.com/repos/FUUK/fuuk/tags","blobs_url":"https://api.github.com/repos/FUUK/fuuk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FUUK/fuuk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FUUK/fuuk/git/refs{/sha}","trees_url":"https://api.github.com/repos/FUUK/fuuk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FUUK/fuuk/statuses/{sha}","languages_url":"https://api.github.com/repos/FUUK/fuuk/languages","stargazers_url":"https://api.github.com/repos/FUUK/fuuk/stargazers","contributors_url":"https://api.github.com/repos/FUUK/fuuk/contributors","subscribers_url":"https://api.github.com/repos/FUUK/fuuk/subscribers","subscription_url":"https://api.github.com/repos/FUUK/fuuk/subscription","commits_url":"https://api.github.com/repos/FUUK/fuuk/commits{/sha}","git_commits_url":"https://api.github.com/repos/FUUK/fuuk/git/commits{/sha}","comments_url":"https://api.github.com/repos/FUUK/fuuk/comments{/number}","issue_comment_url":"https://api.github.com/repos/FUUK/fuuk/issues/comments{/number}","contents_url":"https://api.github.com/repos/FUUK/fuuk/contents/{+path}","compare_url":"https://api.github.com/repos/FUUK/fuuk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FUUK/fuuk/merges","archive_url":"https://api.github.com/repos/FUUK/fuuk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FUUK/fuuk/downloads","issues_url":"https://api.github.com/repos/FUUK/fuuk/issues{/number}","pulls_url":"https://api.github.com/repos/FUUK/fuuk/pulls{/number}","milestones_url":"https://api.github.com/repos/FUUK/fuuk/milestones{/number}","notifications_url":"https://api.github.com/repos/FUUK/fuuk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FUUK/fuuk/labels{/name}","releases_url":"https://api.github.com/repos/FUUK/fuuk/releases{/id}","deployments_url":"https://api.github.com/repos/FUUK/fuuk/deployments","created_at":"2010-10-20T10:22:58Z","updated_at":"2016-03-23T07:36:34Z","pushed_at":"2016-09-20T16:27:59Z","git_url":"git://github.com/FUUK/fuuk.git","ssh_url":"git@github.com:FUUK/fuuk.git","clone_url":"https://github.com/FUUK/fuuk.git","svn_url":"https://github.com/FUUK/fuuk","homepage":"","size":728,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FUUK/fuuk/pulls/101"},"html":{"href":"https://github.com/FUUK/fuuk/pull/101"},"issue":{"href":"https://api.github.com/repos/FUUK/fuuk/issues/101"},"comments":{"href":"https://api.github.com/repos/FUUK/fuuk/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/FUUK/fuuk/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/FUUK/fuuk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FUUK/fuuk/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/FUUK/fuuk/statuses/d1829d97c54be19ef81eced9468c55aa9d370333"}}}}
{"actor":{"display_login":"lumik"}}