{"action":"created","comment":{"url":"https://api.github.com/repos/edx/credentials/pulls/comments/213013602","pull_request_review_id":149758511,"id":213013602,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzAxMzYwMg==","diff_hunk":"@@ -68,5 +70,14 @@ class UserCreditPathway(TimeStampedModel):\n         blank=True,\n     )\n \n+    def clean(self):\n+        # Don't allow pathway to have any type other than the CREDIT type\n+        if self.pathway.pathway_type != PathwayType.CREDIT.value:\n+            raise ValidationError({'pathway': _('User credit pathways can only be connected to credit pathways.')})","path":"credentials/apps/records/models.py","position":23,"original_position":23,"commit_id":"7202276a310dd20695d233c2bfa81afddc75c40d","original_commit_id":"7202276a310dd20695d233c2bfa81afddc75c40d","user":{"login":"bbaker6225","id":14864970,"node_id":"MDQ6VXNlcjE0ODY0OTcw","avatar_url":"https://avatars2.githubusercontent.com/u/14864970?v=4","gravatar_id":"","url":"https://api.github.com/users/bbaker6225","html_url":"https://github.com/bbaker6225","followers_url":"https://api.github.com/users/bbaker6225/followers","following_url":"https://api.github.com/users/bbaker6225/following{/other_user}","gists_url":"https://api.github.com/users/bbaker6225/gists{/gist_id}","starred_url":"https://api.github.com/users/bbaker6225/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbaker6225/subscriptions","organizations_url":"https://api.github.com/users/bbaker6225/orgs","repos_url":"https://api.github.com/users/bbaker6225/repos","events_url":"https://api.github.com/users/bbaker6225/events{/privacy}","received_events_url":"https://api.github.com/users/bbaker6225/received_events","type":"User","site_admin":false},"body":"Since we have a raw id field for pathway on UserCreditPathway in admin, using the limit_choices_to restriction gives the same functionality but gives the more generic: \"Select a valid choice. That choice is not one of the available choices.\" instead of \"User credit pathways can only be connected to credit pathways.\".  \r\n","created_at":"2018-08-27T15:20:56Z","updated_at":"2018-08-27T15:20:56Z","html_url":"https://github.com/edx/credentials/pull/559#discussion_r213013602","pull_request_url":"https://api.github.com/repos/edx/credentials/pulls/559","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/edx/credentials/pulls/comments/213013602"},"html":{"href":"https://github.com/edx/credentials/pull/559#discussion_r213013602"},"pull_request":{"href":"https://api.github.com/repos/edx/credentials/pulls/559"}},"in_reply_to_id":212987123},"pull_request":{"url":"https://api.github.com/repos/edx/credentials/pulls/559","id":210536133,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNTM2MTMz","html_url":"https://github.com/edx/credentials/pull/559","diff_url":"https://github.com/edx/credentials/pull/559.diff","patch_url":"https://github.com/edx/credentials/pull/559.patch","issue_url":"https://api.github.com/repos/edx/credentials/issues/559","number":559,"state":"open","locked":false,"title":"Add pathway_type field to Pathway model","user":{"login":"bbaker6225","id":14864970,"node_id":"MDQ6VXNlcjE0ODY0OTcw","avatar_url":"https://avatars2.githubusercontent.com/u/14864970?v=4","gravatar_id":"","url":"https://api.github.com/users/bbaker6225","html_url":"https://github.com/bbaker6225","followers_url":"https://api.github.com/users/bbaker6225/followers","following_url":"https://api.github.com/users/bbaker6225/following{/other_user}","gists_url":"https://api.github.com/users/bbaker6225/gists{/gist_id}","starred_url":"https://api.github.com/users/bbaker6225/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbaker6225/subscriptions","organizations_url":"https://api.github.com/users/bbaker6225/orgs","repos_url":"https://api.github.com/users/bbaker6225/repos","events_url":"https://api.github.com/users/bbaker6225/events{/privacy}","received_events_url":"https://api.github.com/users/bbaker6225/received_events","type":"User","site_admin":false},"body":"Field used to distinguish between credit pathways and professional\r\npathways.  Professional pathways are referred to as industry pathways\r\nin the code to separate the concept from professional certificate\r\nprograms. Will accompany a similar model change in discovery.\r\n\r\nCredentials Pull Request\r\n---\r\n\r\nMake sure that the following steps are done before rebasing/merging\r\n\r\n  - [ ] Request a review if desired\r\n  - [ ] Squash/Fixup your branch to one commit\r\n  - Config/Dependency Changes (e.g. config files, scripts that are used for provisioning etc.)\r\n    - [ ] Make sure you have updated [edx/configuration](https://github.com/edx/configuration) and [edx/devstack](https://github.com/edx/devstack) if necessary\r\n    - [ ] Make sure the change builds successfully in a sandbox\r\n  - UI Changes \r\n    - [ ] Consider other browsers (e.g. Firefox)\r\n    - [ ] Check mobile view\r\n    - [ ] Consider accessibility (e.g. Run aXe on the page)\r\n","created_at":"2018-08-23T18:27:26Z","updated_at":"2018-08-27T15:20:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f61f6279d24e6f6e7e57de33f9b120d375b77da3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/credentials/pulls/559/commits","review_comments_url":"https://api.github.com/repos/edx/credentials/pulls/559/comments","review_comment_url":"https://api.github.com/repos/edx/credentials/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/credentials/issues/559/comments","statuses_url":"https://api.github.com/repos/edx/credentials/statuses/7202276a310dd20695d233c2bfa81afddc75c40d","head":{"label":"edx:bbaker/add-type-field-to-pathway","ref":"bbaker/add-type-field-to-pathway","sha":"7202276a310dd20695d233c2bfa81afddc75c40d","user":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":47830104,"node_id":"MDEwOlJlcG9zaXRvcnk0NzgzMDEwNA==","name":"credentials","full_name":"edx/credentials","owner":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/credentials","description":"Service hosting course and program certificates","fork":false,"url":"https://api.github.com/repos/edx/credentials","forks_url":"https://api.github.com/repos/edx/credentials/forks","keys_url":"https://api.github.com/repos/edx/credentials/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/credentials/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/credentials/teams","hooks_url":"https://api.github.com/repos/edx/credentials/hooks","issue_events_url":"https://api.github.com/repos/edx/credentials/issues/events{/number}","events_url":"https://api.github.com/repos/edx/credentials/events","assignees_url":"https://api.github.com/repos/edx/credentials/assignees{/user}","branches_url":"https://api.github.com/repos/edx/credentials/branches{/branch}","tags_url":"https://api.github.com/repos/edx/credentials/tags","blobs_url":"https://api.github.com/repos/edx/credentials/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/credentials/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/credentials/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/credentials/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/credentials/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/credentials/languages","stargazers_url":"https://api.github.com/repos/edx/credentials/stargazers","contributors_url":"https://api.github.com/repos/edx/credentials/contributors","subscribers_url":"https://api.github.com/repos/edx/credentials/subscribers","subscription_url":"https://api.github.com/repos/edx/credentials/subscription","commits_url":"https://api.github.com/repos/edx/credentials/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/credentials/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/credentials/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/credentials/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/credentials/contents/{+path}","compare_url":"https://api.github.com/repos/edx/credentials/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/credentials/merges","archive_url":"https://api.github.com/repos/edx/credentials/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/credentials/downloads","issues_url":"https://api.github.com/repos/edx/credentials/issues{/number}","pulls_url":"https://api.github.com/repos/edx/credentials/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/credentials/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/credentials/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/credentials/labels{/name}","releases_url":"https://api.github.com/repos/edx/credentials/releases{/id}","deployments_url":"https://api.github.com/repos/edx/credentials/deployments","created_at":"2015-12-11T14:09:03Z","updated_at":"2018-08-27T10:18:54Z","pushed_at":"2018-08-27T13:52:28Z","git_url":"git://github.com/edx/credentials.git","ssh_url":"git@github.com:edx/credentials.git","clone_url":"https://github.com/edx/credentials.git","svn_url":"https://github.com/edx/credentials","homepage":"","size":7619,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":8,"open_issues":4,"watchers":5,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"3ff013b565fde5f441aee366fe76c55c69cea152","user":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":47830104,"node_id":"MDEwOlJlcG9zaXRvcnk0NzgzMDEwNA==","name":"credentials","full_name":"edx/credentials","owner":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/credentials","description":"Service hosting course and program certificates","fork":false,"url":"https://api.github.com/repos/edx/credentials","forks_url":"https://api.github.com/repos/edx/credentials/forks","keys_url":"https://api.github.com/repos/edx/credentials/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/credentials/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/credentials/teams","hooks_url":"https://api.github.com/repos/edx/credentials/hooks","issue_events_url":"https://api.github.com/repos/edx/credentials/issues/events{/number}","events_url":"https://api.github.com/repos/edx/credentials/events","assignees_url":"https://api.github.com/repos/edx/credentials/assignees{/user}","branches_url":"https://api.github.com/repos/edx/credentials/branches{/branch}","tags_url":"https://api.github.com/repos/edx/credentials/tags","blobs_url":"https://api.github.com/repos/edx/credentials/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/credentials/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/credentials/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/credentials/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/credentials/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/credentials/languages","stargazers_url":"https://api.github.com/repos/edx/credentials/stargazers","contributors_url":"https://api.github.com/repos/edx/credentials/contributors","subscribers_url":"https://api.github.com/repos/edx/credentials/subscribers","subscription_url":"https://api.github.com/repos/edx/credentials/subscription","commits_url":"https://api.github.com/repos/edx/credentials/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/credentials/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/credentials/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/credentials/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/credentials/contents/{+path}","compare_url":"https://api.github.com/repos/edx/credentials/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/credentials/merges","archive_url":"https://api.github.com/repos/edx/credentials/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/credentials/downloads","issues_url":"https://api.github.com/repos/edx/credentials/issues{/number}","pulls_url":"https://api.github.com/repos/edx/credentials/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/credentials/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/credentials/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/credentials/labels{/name}","releases_url":"https://api.github.com/repos/edx/credentials/releases{/id}","deployments_url":"https://api.github.com/repos/edx/credentials/deployments","created_at":"2015-12-11T14:09:03Z","updated_at":"2018-08-27T10:18:54Z","pushed_at":"2018-08-27T13:52:28Z","git_url":"git://github.com/edx/credentials.git","ssh_url":"git@github.com:edx/credentials.git","clone_url":"https://github.com/edx/credentials.git","svn_url":"https://github.com/edx/credentials","homepage":"","size":7619,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":8,"open_issues":4,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/credentials/pulls/559"},"html":{"href":"https://github.com/edx/credentials/pull/559"},"issue":{"href":"https://api.github.com/repos/edx/credentials/issues/559"},"comments":{"href":"https://api.github.com/repos/edx/credentials/issues/559/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/credentials/pulls/559/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/credentials/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/credentials/pulls/559/commits"},"statuses":{"href":"https://api.github.com/repos/edx/credentials/statuses/7202276a310dd20695d233c2bfa81afddc75c40d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bbaker6225"}}