{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/35044324","id":35044324,"diff_hunk":"@@ -56,7 +56,6 @@ def string_required(value):\n \n \n def validate_history_item(item):\n-    string_required(item.get('institution'))","path":"framework/auth/core.py","position":4,"original_position":4,"commit_id":"f7813ef84b1ba58a8ca576bb63e362ce864b66e0","original_commit_id":"5d874b18a1e170acdc03f930614196d5d0db1cb3","user":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"body":"Does it have to be this way? By the time the data reach the server, the data should be valid, correct? In other words, `institution` should always be present in the payload sent to the server.","created_at":"2015-07-20T21:08:33Z","updated_at":"2015-07-20T21:08:33Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/3573#discussion_r35044324","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3573","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/35044324"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/3573#discussion_r35044324"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3573"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3573","id":39855536,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/3573","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/3573.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/3573.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3573","number":3573,"state":"open","locked":false,"title":"[feature] Remove Blank Profile Objects","user":{"login":"billyhunt","id":6232068,"avatar_url":"https://avatars.githubusercontent.com/u/6232068?v=3","gravatar_id":"","url":"https://api.github.com/users/billyhunt","html_url":"https://github.com/billyhunt","followers_url":"https://api.github.com/users/billyhunt/followers","following_url":"https://api.github.com/users/billyhunt/following{/other_user}","gists_url":"https://api.github.com/users/billyhunt/gists{/gist_id}","starred_url":"https://api.github.com/users/billyhunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billyhunt/subscriptions","organizations_url":"https://api.github.com/users/billyhunt/orgs","repos_url":"https://api.github.com/users/billyhunt/repos","events_url":"https://api.github.com/users/billyhunt/events{/privacy}","received_events_url":"https://api.github.com/users/billyhunt/received_events","type":"User","site_admin":false},"body":"Fixes: #2412 and #2384\r\n\r\nA resubmission of  #3515\r\n\r\nCorrect Internal Server Error when Clicking Submit in Profile when there is a blank School or Job object.  Also add exception handling.   \r\n\r\n![screenshot 2015-04-08 09 24 41](https://cloud.githubusercontent.com/assets/6232068/7046101/7b5add84-ddd1-11e4-9f0c-b19c6428e614.png)\r\n\r\n\r\nAfter fix.\r\n\r\n1.  Blank objects will be ignored when \"Submit\" is clicked.  \r\n2.  The Add Institution button will be disabled if there is a  blank object.  It becomes enabled as soon as any field is filled in.\r\n3.  The \"Remove\" link will delete the job or school if there is more then one.  If there is only one, then all fields will be cleared and a save is allowed.  \r\n4.  If any field is filled in and \"Institution\" is not, the user will be alerted that Institution is needed. If no fields are filled in, then the save is allowed the blank object is ignored.","created_at":"2015-07-13T20:56:59Z","updated_at":"2015-07-20T21:08:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"709085d25acc16b2ea793b18fee1c70e8418aa09","assignee":null,"milestone":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/42","html_url":"https://github.com/CenterForOpenScience/osf.io/milestones/0.43.0","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/42/labels","id":1182936,"number":42,"title":"0.43.0","description":"","creator":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":57,"state":"open","created_at":"2015-06-26T17:20:14Z","updated_at":"2015-07-20T20:12:17Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3573/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3573/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3573/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/f7813ef84b1ba58a8ca576bb63e362ce864b66e0","head":{"label":"billyhunt:hotfix/remove-blank-profile-objects2","ref":"hotfix/remove-blank-profile-objects2","sha":"f7813ef84b1ba58a8ca576bb63e362ce864b66e0","user":{"login":"billyhunt","id":6232068,"avatar_url":"https://avatars.githubusercontent.com/u/6232068?v=3","gravatar_id":"","url":"https://api.github.com/users/billyhunt","html_url":"https://github.com/billyhunt","followers_url":"https://api.github.com/users/billyhunt/followers","following_url":"https://api.github.com/users/billyhunt/following{/other_user}","gists_url":"https://api.github.com/users/billyhunt/gists{/gist_id}","starred_url":"https://api.github.com/users/billyhunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billyhunt/subscriptions","organizations_url":"https://api.github.com/users/billyhunt/orgs","repos_url":"https://api.github.com/users/billyhunt/repos","events_url":"https://api.github.com/users/billyhunt/events{/privacy}","received_events_url":"https://api.github.com/users/billyhunt/received_events","type":"User","site_admin":false},"repo":{"id":33544748,"name":"osf.io","full_name":"billyhunt/osf.io","owner":{"login":"billyhunt","id":6232068,"avatar_url":"https://avatars.githubusercontent.com/u/6232068?v=3","gravatar_id":"","url":"https://api.github.com/users/billyhunt","html_url":"https://github.com/billyhunt","followers_url":"https://api.github.com/users/billyhunt/followers","following_url":"https://api.github.com/users/billyhunt/following{/other_user}","gists_url":"https://api.github.com/users/billyhunt/gists{/gist_id}","starred_url":"https://api.github.com/users/billyhunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billyhunt/subscriptions","organizations_url":"https://api.github.com/users/billyhunt/orgs","repos_url":"https://api.github.com/users/billyhunt/repos","events_url":"https://api.github.com/users/billyhunt/events{/privacy}","received_events_url":"https://api.github.com/users/billyhunt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/billyhunt/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/billyhunt/osf.io","forks_url":"https://api.github.com/repos/billyhunt/osf.io/forks","keys_url":"https://api.github.com/repos/billyhunt/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/billyhunt/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/billyhunt/osf.io/teams","hooks_url":"https://api.github.com/repos/billyhunt/osf.io/hooks","issue_events_url":"https://api.github.com/repos/billyhunt/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/billyhunt/osf.io/events","assignees_url":"https://api.github.com/repos/billyhunt/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/billyhunt/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/billyhunt/osf.io/tags","blobs_url":"https://api.github.com/repos/billyhunt/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/billyhunt/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/billyhunt/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/billyhunt/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/billyhunt/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/billyhunt/osf.io/languages","stargazers_url":"https://api.github.com/repos/billyhunt/osf.io/stargazers","contributors_url":"https://api.github.com/repos/billyhunt/osf.io/contributors","subscribers_url":"https://api.github.com/repos/billyhunt/osf.io/subscribers","subscription_url":"https://api.github.com/repos/billyhunt/osf.io/subscription","commits_url":"https://api.github.com/repos/billyhunt/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/billyhunt/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/billyhunt/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/billyhunt/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/billyhunt/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/billyhunt/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/billyhunt/osf.io/merges","archive_url":"https://api.github.com/repos/billyhunt/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/billyhunt/osf.io/downloads","issues_url":"https://api.github.com/repos/billyhunt/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/billyhunt/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/billyhunt/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/billyhunt/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/billyhunt/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/billyhunt/osf.io/releases{/id}","created_at":"2015-04-07T13:28:52Z","updated_at":"2015-05-06T16:08:02Z","pushed_at":"2015-07-20T20:07:51Z","git_url":"git://github.com/billyhunt/osf.io.git","ssh_url":"git@github.com:billyhunt/osf.io.git","clone_url":"https://github.com/billyhunt/osf.io.git","svn_url":"https://github.com/billyhunt/osf.io","homepage":"http://osf.io","size":97086,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"e5976e848bab803f414b8adc895eda30e8c3d5ac","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","created_at":"2013-05-21T15:53:37Z","updated_at":"2015-07-15T15:30:36Z","pushed_at":"2015-07-20T21:00:49Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":218112,"stargazers_count":119,"watchers_count":119,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":556,"forks":104,"open_issues":556,"watchers":119,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3573"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/3573"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3573"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3573/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3573/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3573/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/f7813ef84b1ba58a8ca576bb63e362ce864b66e0"}}}}