{"action":"created","comment":{"url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/comments/47352914","id":47352914,"diff_hunk":"@@ -0,0 +1,21 @@\n+# -*- coding: utf-8 -*-\n+from __future__ import unicode_literals\n+\n+from django.db import models, migrations\n+\n+\n+class Migration(migrations.Migration):\n+\n+    dependencies = [\n+        ('locations', '0002_auto_20141126_2054'),\n+    ]\n+\n+    operations = [\n+        migrations.AddField(\n+            model_name='adminboundary',\n+            name='in_country',\n+            field=models.CharField(\n+                help_text=b\"The OSM id of this admin level's country id\", max_length=15, null=True),\n+            preserve_default=True,","path":"temba/locations/migrations/0003_adminboundary_in_country.py","position":19,"original_position":19,"commit_id":"31eddf39dd84eef27db6f7e6d26b430e372a352a","original_commit_id":"31eddf39dd84eef27db6f7e6d26b430e372a352a","user":{"login":"jofomah","id":5929681,"avatar_url":"https://avatars.githubusercontent.com/u/5929681?v=3","gravatar_id":"","url":"https://api.github.com/users/jofomah","html_url":"https://github.com/jofomah","followers_url":"https://api.github.com/users/jofomah/followers","following_url":"https://api.github.com/users/jofomah/following{/other_user}","gists_url":"https://api.github.com/users/jofomah/gists{/gist_id}","starred_url":"https://api.github.com/users/jofomah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jofomah/subscriptions","organizations_url":"https://api.github.com/users/jofomah/orgs","repos_url":"https://api.github.com/users/jofomah/repos","events_url":"https://api.github.com/users/jofomah/events{/privacy}","received_events_url":"https://api.github.com/users/jofomah/received_events","type":"User","site_admin":false},"body":"@nicpottier it is not an MPTT thing, i added it so that i can easily tell if an admin level is within a country without running nested query from the level up to the country level. \r\n\r\ne.g https://github.com/rapidpro/rapidpro/blob/master/temba/locations/management/commands/import_geojson.py#L102\r\n\r\n` if level == STATE_LEVEL:\r\n            AdminBoundary.objects.filter(level=level, parent__osm_id=country_osm_id).exclude(osm_id__in=seen_osm_ids).delete()\r\n        elif level == DISTRICT_LEVEL:\r\n            AdminBoundary.objects.filter(level=level, parent__parent__osm_id=country_osm_id).exclude(osm_id__in=seen_osm_ids).delete()\r\n`","created_at":"2015-12-11T13:09:10Z","updated_at":"2015-12-11T13:09:10Z","html_url":"https://github.com/rapidpro/rapidpro/pull/210#discussion_r47352914","pull_request_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/210","_links":{"self":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/comments/47352914"},"html":{"href":"https://github.com/rapidpro/rapidpro/pull/210#discussion_r47352914"},"pull_request":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/210"}}},"pull_request":{"url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/210","id":53227467,"html_url":"https://github.com/rapidpro/rapidpro/pull/210","diff_url":"https://github.com/rapidpro/rapidpro/pull/210.diff","patch_url":"https://github.com/rapidpro/rapidpro/pull/210.patch","issue_url":"https://api.github.com/repos/rapidpro/rapidpro/issues/210","number":210,"state":"open","locked":false,"title":"update geojson importer and show extra levels on leaflet","user":{"login":"jofomah","id":5929681,"avatar_url":"https://avatars.githubusercontent.com/u/5929681?v=3","gravatar_id":"","url":"https://api.github.com/users/jofomah","html_url":"https://github.com/jofomah","followers_url":"https://api.github.com/users/jofomah/followers","following_url":"https://api.github.com/users/jofomah/following{/other_user}","gists_url":"https://api.github.com/users/jofomah/gists{/gist_id}","starred_url":"https://api.github.com/users/jofomah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jofomah/subscriptions","organizations_url":"https://api.github.com/users/jofomah/orgs","repos_url":"https://api.github.com/users/jofomah/repos","events_url":"https://api.github.com/users/jofomah/events{/privacy}","received_events_url":"https://api.github.com/users/jofomah/received_events","type":"User","site_admin":false},"body":"Requires user to run django migration","created_at":"2015-12-10T08:17:06Z","updated_at":"2015-12-11T13:09:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/210/commits","review_comments_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/210/comments","review_comment_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rapidpro/rapidpro/issues/210/comments","statuses_url":"https://api.github.com/repos/rapidpro/rapidpro/statuses/31eddf39dd84eef27db6f7e6d26b430e372a352a","head":{"label":"eHealthAfrica:master","ref":"master","sha":"31eddf39dd84eef27db6f7e6d26b430e372a352a","user":{"login":"eHealthAfrica","id":3214042,"avatar_url":"https://avatars.githubusercontent.com/u/3214042?v=3","gravatar_id":"","url":"https://api.github.com/users/eHealthAfrica","html_url":"https://github.com/eHealthAfrica","followers_url":"https://api.github.com/users/eHealthAfrica/followers","following_url":"https://api.github.com/users/eHealthAfrica/following{/other_user}","gists_url":"https://api.github.com/users/eHealthAfrica/gists{/gist_id}","starred_url":"https://api.github.com/users/eHealthAfrica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eHealthAfrica/subscriptions","organizations_url":"https://api.github.com/users/eHealthAfrica/orgs","repos_url":"https://api.github.com/users/eHealthAfrica/repos","events_url":"https://api.github.com/users/eHealthAfrica/events{/privacy}","received_events_url":"https://api.github.com/users/eHealthAfrica/received_events","type":"Organization","site_admin":false},"repo":{"id":42607792,"name":"rapidpro","full_name":"eHealthAfrica/rapidpro","owner":{"login":"eHealthAfrica","id":3214042,"avatar_url":"https://avatars.githubusercontent.com/u/3214042?v=3","gravatar_id":"","url":"https://api.github.com/users/eHealthAfrica","html_url":"https://github.com/eHealthAfrica","followers_url":"https://api.github.com/users/eHealthAfrica/followers","following_url":"https://api.github.com/users/eHealthAfrica/following{/other_user}","gists_url":"https://api.github.com/users/eHealthAfrica/gists{/gist_id}","starred_url":"https://api.github.com/users/eHealthAfrica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eHealthAfrica/subscriptions","organizations_url":"https://api.github.com/users/eHealthAfrica/orgs","repos_url":"https://api.github.com/users/eHealthAfrica/repos","events_url":"https://api.github.com/users/eHealthAfrica/events{/privacy}","received_events_url":"https://api.github.com/users/eHealthAfrica/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eHealthAfrica/rapidpro","description":"RapidPro allows organizations to visually build scalable interactive messaging applications.","fork":true,"url":"https://api.github.com/repos/eHealthAfrica/rapidpro","forks_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/forks","keys_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/teams","hooks_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/hooks","issue_events_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/issues/events{/number}","events_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/events","assignees_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/assignees{/user}","branches_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/branches{/branch}","tags_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/tags","blobs_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/git/refs{/sha}","trees_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/statuses/{sha}","languages_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/languages","stargazers_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/stargazers","contributors_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/contributors","subscribers_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/subscribers","subscription_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/subscription","commits_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/commits{/sha}","git_commits_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/git/commits{/sha}","comments_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/comments{/number}","issue_comment_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/issues/comments{/number}","contents_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/contents/{+path}","compare_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/merges","archive_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/downloads","issues_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/issues{/number}","pulls_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/pulls{/number}","milestones_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/milestones{/number}","notifications_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/labels{/name}","releases_url":"https://api.github.com/repos/eHealthAfrica/rapidpro/releases{/id}","created_at":"2015-09-16T19:09:47Z","updated_at":"2015-09-16T19:09:49Z","pushed_at":"2015-12-09T10:20:56Z","git_url":"git://github.com/eHealthAfrica/rapidpro.git","ssh_url":"git@github.com:eHealthAfrica/rapidpro.git","clone_url":"https://github.com/eHealthAfrica/rapidpro.git","svn_url":"https://github.com/eHealthAfrica/rapidpro","homepage":"","size":27251,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rapidpro:master","ref":"master","sha":"d19e37d10d8a92cf1bd6523f8bf2a4c0afb90501","user":{"login":"rapidpro","id":7733752,"avatar_url":"https://avatars.githubusercontent.com/u/7733752?v=3","gravatar_id":"","url":"https://api.github.com/users/rapidpro","html_url":"https://github.com/rapidpro","followers_url":"https://api.github.com/users/rapidpro/followers","following_url":"https://api.github.com/users/rapidpro/following{/other_user}","gists_url":"https://api.github.com/users/rapidpro/gists{/gist_id}","starred_url":"https://api.github.com/users/rapidpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapidpro/subscriptions","organizations_url":"https://api.github.com/users/rapidpro/orgs","repos_url":"https://api.github.com/users/rapidpro/repos","events_url":"https://api.github.com/users/rapidpro/events{/privacy}","received_events_url":"https://api.github.com/users/rapidpro/received_events","type":"Organization","site_admin":false},"repo":{"id":27091452,"name":"rapidpro","full_name":"rapidpro/rapidpro","owner":{"login":"rapidpro","id":7733752,"avatar_url":"https://avatars.githubusercontent.com/u/7733752?v=3","gravatar_id":"","url":"https://api.github.com/users/rapidpro","html_url":"https://github.com/rapidpro","followers_url":"https://api.github.com/users/rapidpro/followers","following_url":"https://api.github.com/users/rapidpro/following{/other_user}","gists_url":"https://api.github.com/users/rapidpro/gists{/gist_id}","starred_url":"https://api.github.com/users/rapidpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapidpro/subscriptions","organizations_url":"https://api.github.com/users/rapidpro/orgs","repos_url":"https://api.github.com/users/rapidpro/repos","events_url":"https://api.github.com/users/rapidpro/events{/privacy}","received_events_url":"https://api.github.com/users/rapidpro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rapidpro/rapidpro","description":"RapidPro allows organizations to visually build scalable interactive messaging applications.","fork":false,"url":"https://api.github.com/repos/rapidpro/rapidpro","forks_url":"https://api.github.com/repos/rapidpro/rapidpro/forks","keys_url":"https://api.github.com/repos/rapidpro/rapidpro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapidpro/rapidpro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapidpro/rapidpro/teams","hooks_url":"https://api.github.com/repos/rapidpro/rapidpro/hooks","issue_events_url":"https://api.github.com/repos/rapidpro/rapidpro/issues/events{/number}","events_url":"https://api.github.com/repos/rapidpro/rapidpro/events","assignees_url":"https://api.github.com/repos/rapidpro/rapidpro/assignees{/user}","branches_url":"https://api.github.com/repos/rapidpro/rapidpro/branches{/branch}","tags_url":"https://api.github.com/repos/rapidpro/rapidpro/tags","blobs_url":"https://api.github.com/repos/rapidpro/rapidpro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapidpro/rapidpro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapidpro/rapidpro/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapidpro/rapidpro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapidpro/rapidpro/statuses/{sha}","languages_url":"https://api.github.com/repos/rapidpro/rapidpro/languages","stargazers_url":"https://api.github.com/repos/rapidpro/rapidpro/stargazers","contributors_url":"https://api.github.com/repos/rapidpro/rapidpro/contributors","subscribers_url":"https://api.github.com/repos/rapidpro/rapidpro/subscribers","subscription_url":"https://api.github.com/repos/rapidpro/rapidpro/subscription","commits_url":"https://api.github.com/repos/rapidpro/rapidpro/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapidpro/rapidpro/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapidpro/rapidpro/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapidpro/rapidpro/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapidpro/rapidpro/contents/{+path}","compare_url":"https://api.github.com/repos/rapidpro/rapidpro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapidpro/rapidpro/merges","archive_url":"https://api.github.com/repos/rapidpro/rapidpro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapidpro/rapidpro/downloads","issues_url":"https://api.github.com/repos/rapidpro/rapidpro/issues{/number}","pulls_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls{/number}","milestones_url":"https://api.github.com/repos/rapidpro/rapidpro/milestones{/number}","notifications_url":"https://api.github.com/repos/rapidpro/rapidpro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapidpro/rapidpro/labels{/name}","releases_url":"https://api.github.com/repos/rapidpro/rapidpro/releases{/id}","created_at":"2014-11-24T19:32:48Z","updated_at":"2015-12-09T10:25:30Z","pushed_at":"2015-12-10T08:17:08Z","git_url":"git://github.com/rapidpro/rapidpro.git","ssh_url":"git@github.com:rapidpro/rapidpro.git","clone_url":"https://github.com/rapidpro/rapidpro.git","svn_url":"https://github.com/rapidpro/rapidpro","homepage":"","size":22685,"stargazers_count":300,"watchers_count":300,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":92,"mirror_url":null,"open_issues_count":99,"forks":92,"open_issues":99,"watchers":300,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/210"},"html":{"href":"https://github.com/rapidpro/rapidpro/pull/210"},"issue":{"href":"https://api.github.com/repos/rapidpro/rapidpro/issues/210"},"comments":{"href":"https://api.github.com/repos/rapidpro/rapidpro/issues/210/comments"},"review_comments":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/210/comments"},"review_comment":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/210/commits"},"statuses":{"href":"https://api.github.com/repos/rapidpro/rapidpro/statuses/31eddf39dd84eef27db6f7e6d26b430e372a352a"}}}}