{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/12064","repository_url":"https://api.github.com/repos/edx/edx-platform","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/12064/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/12064/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/12064/events","html_url":"https://github.com/edx/edx-platform/pull/12064","id":146492772,"number":12064,"title":"Disallow free verified course modes (second attempt)","user":{"login":"omarkhan","id":793379,"avatar_url":"https://avatars.githubusercontent.com/u/793379?v=3","gravatar_id":"","url":"https://api.github.com/users/omarkhan","html_url":"https://github.com/omarkhan","followers_url":"https://api.github.com/users/omarkhan/followers","following_url":"https://api.github.com/users/omarkhan/following{/other_user}","gists_url":"https://api.github.com/users/omarkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/omarkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarkhan/subscriptions","organizations_url":"https://api.github.com/users/omarkhan/orgs","repos_url":"https://api.github.com/users/omarkhan/repos","events_url":"https://api.github.com/users/omarkhan/events{/privacy}","received_events_url":"https://api.github.com/users/omarkhan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-07T02:46:27Z","updated_at":"2016-04-11T14:13:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/12064","html_url":"https://github.com/edx/edx-platform/pull/12064","diff_url":"https://github.com/edx/edx-platform/pull/12064.diff","patch_url":"https://github.com/edx/edx-platform/pull/12064.patch"},"body":"This is a second attempt at https://github.com/edx/edx-platform/pull/11374 that was reverted in https://github.com/edx/edx-platform/pull/12061.\r\n\r\n**Background:** The verification workflow assumes that all verified courses will have a price. Free verified course modes cause a 404 when the user attempts to enroll or upgrade.\r\n\r\nThis pull request adds a validation check to the `CourseMode` model to check that a price has been set if the mode is set to `validation` or `professional`.\r\n\r\n**Testing:** Create a `CourseMode` instance in the django admin with mode `verified` and price 0.\r\n\r\nExpected: fails with a validation error\r\nPrevious behaviour: accepted. Attempt to upgrade to verified course results in 404:\r\n\r\n<img width=\"870\" alt=\"screen shot 2016-01-29 at 13 58 47\" src=\"https://cloud.githubusercontent.com/assets/793379/12669187/1c3097be-c691-11e5-92be-87d34e3d4a52.png\">\r\n\r\nClick 'Upgrade to Verified':\r\n\r\n<img width=\"632\" alt=\"screen shot 2016-01-29 at 13 59 35\" src=\"https://cloud.githubusercontent.com/assets/793379/12669188/1c362256-c691-11e5-942d-13ae65067e10.png\">"},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/208367435","html_url":"https://github.com/edx/edx-platform/pull/12064#issuecomment-208367435","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/12064","id":208367435,"user":{"login":"omarkhan","id":793379,"avatar_url":"https://avatars.githubusercontent.com/u/793379?v=3","gravatar_id":"","url":"https://api.github.com/users/omarkhan","html_url":"https://github.com/omarkhan","followers_url":"https://api.github.com/users/omarkhan/followers","following_url":"https://api.github.com/users/omarkhan/following{/other_user}","gists_url":"https://api.github.com/users/omarkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/omarkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarkhan/subscriptions","organizations_url":"https://api.github.com/users/omarkhan/orgs","repos_url":"https://api.github.com/users/omarkhan/repos","events_url":"https://api.github.com/users/omarkhan/events{/privacy}","received_events_url":"https://api.github.com/users/omarkhan/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T14:13:20Z","updated_at":"2016-04-11T14:13:20Z","body":"Thanks for the review, I am currently on holiday, I will squash and merge\nwhen I get back next week\n"}}