{"action":"created","comment":{"url":"https://api.github.com/repos/openfun/fun-apps/pulls/comments/78994663","id":78994663,"diff_hunk":"@@ -32,7 +50,11 @@ def update_mongo_courses(apps, schema_editor):\n     \"\"\"\n \n     mongo_courses = modulestore().get_courses()\n-    user_id = User.objects.filter(is_superuser=True).first().id\n+\n+    user_id = get_an_admin_id_if_any()\n+    if not user_id:\n+        return False  # want happens when we return false from a data migration script ?","path":"courses/migrations/0002_is_visible_deprecated.py","position":26,"original_position":39,"commit_id":"3d7e5969b74d58d557a4ac2438d496f7e45f4ab0","original_commit_id":"3d7e5969b74d58d557a4ac2438d496f7e45f4ab0","user":{"login":"rmoch","id":89626,"avatar_url":"https://avatars.githubusercontent.com/u/89626?v=3","gravatar_id":"","url":"https://api.github.com/users/rmoch","html_url":"https://github.com/rmoch","followers_url":"https://api.github.com/users/rmoch/followers","following_url":"https://api.github.com/users/rmoch/following{/other_user}","gists_url":"https://api.github.com/users/rmoch/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoch/subscriptions","organizations_url":"https://api.github.com/users/rmoch/orgs","repos_url":"https://api.github.com/users/rmoch/repos","events_url":"https://api.github.com/users/rmoch/events{/privacy}","received_events_url":"https://api.github.com/users/rmoch/received_events","type":"User","site_admin":false},"body":"response: nothing happens. a migration do not have to return anything","created_at":"2016-09-15T15:39:18Z","updated_at":"2016-09-15T15:39:50Z","html_url":"https://github.com/openfun/fun-apps/pull/559#discussion_r78994663","pull_request_url":"https://api.github.com/repos/openfun/fun-apps/pulls/559","_links":{"self":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/comments/78994663"},"html":{"href":"https://github.com/openfun/fun-apps/pull/559#discussion_r78994663"},"pull_request":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/559"}}},"pull_request":{"url":"https://api.github.com/repos/openfun/fun-apps/pulls/559","id":85423061,"html_url":"https://github.com/openfun/fun-apps/pull/559","diff_url":"https://github.com/openfun/fun-apps/pull/559.diff","patch_url":"https://github.com/openfun/fun-apps/pull/559.patch","issue_url":"https://api.github.com/repos/openfun/fun-apps/issues/559","number":559,"state":"open","locked":false,"title":"update data migration script to not crash when no data.","user":{"login":"ice3","id":3459899,"avatar_url":"https://avatars.githubusercontent.com/u/3459899?v=3","gravatar_id":"","url":"https://api.github.com/users/ice3","html_url":"https://github.com/ice3","followers_url":"https://api.github.com/users/ice3/followers","following_url":"https://api.github.com/users/ice3/following{/other_user}","gists_url":"https://api.github.com/users/ice3/gists{/gist_id}","starred_url":"https://api.github.com/users/ice3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice3/subscriptions","organizations_url":"https://api.github.com/users/ice3/orgs","repos_url":"https://api.github.com/users/ice3/repos","events_url":"https://api.github.com/users/ice3/events{/privacy}","received_events_url":"https://api.github.com/users/ice3/received_events","type":"User","site_admin":false},"body":"Closes #3188","created_at":"2016-09-15T15:11:48Z","updated_at":"2016-09-15T15:39:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e632101cc5587d986acf86ec39d935a904ab21f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openfun/fun-apps/pulls/559/commits","review_comments_url":"https://api.github.com/repos/openfun/fun-apps/pulls/559/comments","review_comment_url":"https://api.github.com/repos/openfun/fun-apps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfun/fun-apps/issues/559/comments","statuses_url":"https://api.github.com/repos/openfun/fun-apps/statuses/3d7e5969b74d58d557a4ac2438d496f7e45f4ab0","head":{"label":"openfun:ice3/3188-improve-course-migration","ref":"ice3/3188-improve-course-migration","sha":"3d7e5969b74d58d557a4ac2438d496f7e45f4ab0","user":{"login":"openfun","id":7224891,"avatar_url":"https://avatars.githubusercontent.com/u/7224891?v=3","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"repo":{"id":20556967,"name":"fun-apps","full_name":"openfun/fun-apps","owner":{"login":"openfun","id":7224891,"avatar_url":"https://avatars.githubusercontent.com/u/7224891?v=3","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfun/fun-apps","description":"The main code repository for FUN MOOC","fork":false,"url":"https://api.github.com/repos/openfun/fun-apps","forks_url":"https://api.github.com/repos/openfun/fun-apps/forks","keys_url":"https://api.github.com/repos/openfun/fun-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfun/fun-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfun/fun-apps/teams","hooks_url":"https://api.github.com/repos/openfun/fun-apps/hooks","issue_events_url":"https://api.github.com/repos/openfun/fun-apps/issues/events{/number}","events_url":"https://api.github.com/repos/openfun/fun-apps/events","assignees_url":"https://api.github.com/repos/openfun/fun-apps/assignees{/user}","branches_url":"https://api.github.com/repos/openfun/fun-apps/branches{/branch}","tags_url":"https://api.github.com/repos/openfun/fun-apps/tags","blobs_url":"https://api.github.com/repos/openfun/fun-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfun/fun-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfun/fun-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfun/fun-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfun/fun-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/openfun/fun-apps/languages","stargazers_url":"https://api.github.com/repos/openfun/fun-apps/stargazers","contributors_url":"https://api.github.com/repos/openfun/fun-apps/contributors","subscribers_url":"https://api.github.com/repos/openfun/fun-apps/subscribers","subscription_url":"https://api.github.com/repos/openfun/fun-apps/subscription","commits_url":"https://api.github.com/repos/openfun/fun-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfun/fun-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfun/fun-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfun/fun-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfun/fun-apps/contents/{+path}","compare_url":"https://api.github.com/repos/openfun/fun-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfun/fun-apps/merges","archive_url":"https://api.github.com/repos/openfun/fun-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfun/fun-apps/downloads","issues_url":"https://api.github.com/repos/openfun/fun-apps/issues{/number}","pulls_url":"https://api.github.com/repos/openfun/fun-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/openfun/fun-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/openfun/fun-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfun/fun-apps/labels{/name}","releases_url":"https://api.github.com/repos/openfun/fun-apps/releases{/id}","deployments_url":"https://api.github.com/repos/openfun/fun-apps/deployments","created_at":"2014-06-06T08:42:58Z","updated_at":"2016-09-15T12:27:16Z","pushed_at":"2016-09-15T15:11:48Z","git_url":"git://github.com/openfun/fun-apps.git","ssh_url":"git@github.com:openfun/fun-apps.git","clone_url":"https://github.com/openfun/fun-apps.git","svn_url":"https://github.com/openfun/fun-apps","homepage":"https://www.france-universite-numerique-mooc.fr/","size":28700,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":9,"forks":9,"open_issues":9,"watchers":3,"default_branch":"dev"}},"base":{"label":"openfun:fun/dogwood","ref":"fun/dogwood","sha":"1daa9bbcc0fd6b46e80be3fc6f38668d8282cf74","user":{"login":"openfun","id":7224891,"avatar_url":"https://avatars.githubusercontent.com/u/7224891?v=3","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"repo":{"id":20556967,"name":"fun-apps","full_name":"openfun/fun-apps","owner":{"login":"openfun","id":7224891,"avatar_url":"https://avatars.githubusercontent.com/u/7224891?v=3","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfun/fun-apps","description":"The main code repository for FUN MOOC","fork":false,"url":"https://api.github.com/repos/openfun/fun-apps","forks_url":"https://api.github.com/repos/openfun/fun-apps/forks","keys_url":"https://api.github.com/repos/openfun/fun-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfun/fun-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfun/fun-apps/teams","hooks_url":"https://api.github.com/repos/openfun/fun-apps/hooks","issue_events_url":"https://api.github.com/repos/openfun/fun-apps/issues/events{/number}","events_url":"https://api.github.com/repos/openfun/fun-apps/events","assignees_url":"https://api.github.com/repos/openfun/fun-apps/assignees{/user}","branches_url":"https://api.github.com/repos/openfun/fun-apps/branches{/branch}","tags_url":"https://api.github.com/repos/openfun/fun-apps/tags","blobs_url":"https://api.github.com/repos/openfun/fun-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfun/fun-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfun/fun-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfun/fun-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfun/fun-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/openfun/fun-apps/languages","stargazers_url":"https://api.github.com/repos/openfun/fun-apps/stargazers","contributors_url":"https://api.github.com/repos/openfun/fun-apps/contributors","subscribers_url":"https://api.github.com/repos/openfun/fun-apps/subscribers","subscription_url":"https://api.github.com/repos/openfun/fun-apps/subscription","commits_url":"https://api.github.com/repos/openfun/fun-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfun/fun-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfun/fun-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfun/fun-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfun/fun-apps/contents/{+path}","compare_url":"https://api.github.com/repos/openfun/fun-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfun/fun-apps/merges","archive_url":"https://api.github.com/repos/openfun/fun-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfun/fun-apps/downloads","issues_url":"https://api.github.com/repos/openfun/fun-apps/issues{/number}","pulls_url":"https://api.github.com/repos/openfun/fun-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/openfun/fun-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/openfun/fun-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfun/fun-apps/labels{/name}","releases_url":"https://api.github.com/repos/openfun/fun-apps/releases{/id}","deployments_url":"https://api.github.com/repos/openfun/fun-apps/deployments","created_at":"2014-06-06T08:42:58Z","updated_at":"2016-09-15T12:27:16Z","pushed_at":"2016-09-15T15:11:48Z","git_url":"git://github.com/openfun/fun-apps.git","ssh_url":"git@github.com:openfun/fun-apps.git","clone_url":"https://github.com/openfun/fun-apps.git","svn_url":"https://github.com/openfun/fun-apps","homepage":"https://www.france-universite-numerique-mooc.fr/","size":28700,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":9,"forks":9,"open_issues":9,"watchers":3,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/559"},"html":{"href":"https://github.com/openfun/fun-apps/pull/559"},"issue":{"href":"https://api.github.com/repos/openfun/fun-apps/issues/559"},"comments":{"href":"https://api.github.com/repos/openfun/fun-apps/issues/559/comments"},"review_comments":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/559/comments"},"review_comment":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/559/commits"},"statuses":{"href":"https://api.github.com/repos/openfun/fun-apps/statuses/3d7e5969b74d58d557a4ac2438d496f7e45f4ab0"}}}}
{"actor":{"display_login":"rmoch"}}