{"action":"created","comment":{"url":"https://api.github.com/repos/juju/charmstore/pulls/comments/44634402","id":44634402,"diff_hunk":"@@ -523,9 +523,12 @@ func (s *Store) AddCharm(c charm.Charm, p AddParams) (err error) {\n \t// always be canonical, but check just in case anyway, as this is\n \t// final gateway before a potentially invalid url might be stored\n \t// in the database.\n-\tif p.URL.URL.Series == \"bundle\" || p.URL.URL.User == \"\" || p.URL.URL.Revision == -1 || p.URL.URL.Series == \"\" {\n+\tif p.URL.URL.Series == \"bundle\" || p.URL.URL.User == \"\" || p.URL.URL.Revision == -1 {\n \t\treturn errgo.Newf(\"charm added with invalid id %v\", &p.URL.URL)\n \t}\n+\tif p.URL.URL.Series == \"\" && len(c.Meta().Series) == 0 {\n+\t\treturn errgo.Newf(\"charm added without series %v\", &p.URL.URL)","path":"internal/charmstore/store.go","position":9,"original_position":9,"commit_id":"595a01e45bc8d379505f4a5ca30dd52ab8fa1aab","original_commit_id":"595a01e45bc8d379505f4a5ca30dd52ab8fa1aab","user":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"body":"I don't think that will live in this part of the code, I might be wrong though. It will be added when we implement upload.","created_at":"2015-11-12T09:06:33Z","updated_at":"2015-11-12T09:06:33Z","html_url":"https://github.com/juju/charmstore/pull/451#discussion_r44634402","pull_request_url":"https://api.github.com/repos/juju/charmstore/pulls/451","_links":{"self":{"href":"https://api.github.com/repos/juju/charmstore/pulls/comments/44634402"},"html":{"href":"https://github.com/juju/charmstore/pull/451#discussion_r44634402"},"pull_request":{"href":"https://api.github.com/repos/juju/charmstore/pulls/451"}}},"pull_request":{"url":"https://api.github.com/repos/juju/charmstore/pulls/451","id":50480471,"html_url":"https://github.com/juju/charmstore/pull/451","diff_url":"https://github.com/juju/charmstore/pull/451.diff","patch_url":"https://github.com/juju/charmstore/pull/451.patch","issue_url":"https://api.github.com/repos/juju/charmstore/issues/451","number":451,"state":"open","locked":false,"title":"insert charms with multiple series","user":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-12T07:43:43Z","updated_at":"2015-11-12T09:06:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32c788852e85b7e3e9bd7bad28b9453953bb33b8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juju/charmstore/pulls/451/commits","review_comments_url":"https://api.github.com/repos/juju/charmstore/pulls/451/comments","review_comment_url":"https://api.github.com/repos/juju/charmstore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/charmstore/issues/451/comments","statuses_url":"https://api.github.com/repos/juju/charmstore/statuses/595a01e45bc8d379505f4a5ca30dd52ab8fa1aab","head":{"label":"mhilton:027-insert-multi-series-charms","ref":"027-insert-multi-series-charms","sha":"595a01e45bc8d379505f4a5ca30dd52ab8fa1aab","user":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"repo":{"id":24229515,"name":"juju-charmstore","full_name":"mhilton/juju-charmstore","owner":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhilton/juju-charmstore","description":"The charm store server.","fork":true,"url":"https://api.github.com/repos/mhilton/juju-charmstore","forks_url":"https://api.github.com/repos/mhilton/juju-charmstore/forks","keys_url":"https://api.github.com/repos/mhilton/juju-charmstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhilton/juju-charmstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhilton/juju-charmstore/teams","hooks_url":"https://api.github.com/repos/mhilton/juju-charmstore/hooks","issue_events_url":"https://api.github.com/repos/mhilton/juju-charmstore/issues/events{/number}","events_url":"https://api.github.com/repos/mhilton/juju-charmstore/events","assignees_url":"https://api.github.com/repos/mhilton/juju-charmstore/assignees{/user}","branches_url":"https://api.github.com/repos/mhilton/juju-charmstore/branches{/branch}","tags_url":"https://api.github.com/repos/mhilton/juju-charmstore/tags","blobs_url":"https://api.github.com/repos/mhilton/juju-charmstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhilton/juju-charmstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhilton/juju-charmstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhilton/juju-charmstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhilton/juju-charmstore/statuses/{sha}","languages_url":"https://api.github.com/repos/mhilton/juju-charmstore/languages","stargazers_url":"https://api.github.com/repos/mhilton/juju-charmstore/stargazers","contributors_url":"https://api.github.com/repos/mhilton/juju-charmstore/contributors","subscribers_url":"https://api.github.com/repos/mhilton/juju-charmstore/subscribers","subscription_url":"https://api.github.com/repos/mhilton/juju-charmstore/subscription","commits_url":"https://api.github.com/repos/mhilton/juju-charmstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhilton/juju-charmstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhilton/juju-charmstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhilton/juju-charmstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhilton/juju-charmstore/contents/{+path}","compare_url":"https://api.github.com/repos/mhilton/juju-charmstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhilton/juju-charmstore/merges","archive_url":"https://api.github.com/repos/mhilton/juju-charmstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhilton/juju-charmstore/downloads","issues_url":"https://api.github.com/repos/mhilton/juju-charmstore/issues{/number}","pulls_url":"https://api.github.com/repos/mhilton/juju-charmstore/pulls{/number}","milestones_url":"https://api.github.com/repos/mhilton/juju-charmstore/milestones{/number}","notifications_url":"https://api.github.com/repos/mhilton/juju-charmstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhilton/juju-charmstore/labels{/name}","releases_url":"https://api.github.com/repos/mhilton/juju-charmstore/releases{/id}","created_at":"2014-09-19T12:48:28Z","updated_at":"2015-11-09T16:16:46Z","pushed_at":"2015-11-12T07:42:32Z","git_url":"git://github.com/mhilton/juju-charmstore.git","ssh_url":"git@github.com:mhilton/juju-charmstore.git","clone_url":"https://github.com/mhilton/juju-charmstore.git","svn_url":"https://github.com/mhilton/juju-charmstore","homepage":null,"size":3488,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v4"}},"base":{"label":"juju:v5-unstable","ref":"v5-unstable","sha":"a8439ffba2adf806b324faeda6c1df1b8f039665","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20720417,"name":"charmstore","full_name":"juju/charmstore","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/charmstore","description":"The charm store server.","fork":false,"url":"https://api.github.com/repos/juju/charmstore","forks_url":"https://api.github.com/repos/juju/charmstore/forks","keys_url":"https://api.github.com/repos/juju/charmstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/charmstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/charmstore/teams","hooks_url":"https://api.github.com/repos/juju/charmstore/hooks","issue_events_url":"https://api.github.com/repos/juju/charmstore/issues/events{/number}","events_url":"https://api.github.com/repos/juju/charmstore/events","assignees_url":"https://api.github.com/repos/juju/charmstore/assignees{/user}","branches_url":"https://api.github.com/repos/juju/charmstore/branches{/branch}","tags_url":"https://api.github.com/repos/juju/charmstore/tags","blobs_url":"https://api.github.com/repos/juju/charmstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/charmstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/charmstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/charmstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/charmstore/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/charmstore/languages","stargazers_url":"https://api.github.com/repos/juju/charmstore/stargazers","contributors_url":"https://api.github.com/repos/juju/charmstore/contributors","subscribers_url":"https://api.github.com/repos/juju/charmstore/subscribers","subscription_url":"https://api.github.com/repos/juju/charmstore/subscription","commits_url":"https://api.github.com/repos/juju/charmstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/charmstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/charmstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/charmstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/charmstore/contents/{+path}","compare_url":"https://api.github.com/repos/juju/charmstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/charmstore/merges","archive_url":"https://api.github.com/repos/juju/charmstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/charmstore/downloads","issues_url":"https://api.github.com/repos/juju/charmstore/issues{/number}","pulls_url":"https://api.github.com/repos/juju/charmstore/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/charmstore/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/charmstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/charmstore/labels{/name}","releases_url":"https://api.github.com/repos/juju/charmstore/releases{/id}","created_at":"2014-06-11T09:53:37Z","updated_at":"2015-05-08T13:47:14Z","pushed_at":"2015-11-12T08:37:09Z","git_url":"git://github.com/juju/charmstore.git","ssh_url":"git@github.com:juju/charmstore.git","clone_url":"https://github.com/juju/charmstore.git","svn_url":"https://github.com/juju/charmstore","homepage":null,"size":6427,"stargazers_count":6,"watchers_count":6,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":19,"forks":15,"open_issues":19,"watchers":6,"default_branch":"v5-unstable"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/charmstore/pulls/451"},"html":{"href":"https://github.com/juju/charmstore/pull/451"},"issue":{"href":"https://api.github.com/repos/juju/charmstore/issues/451"},"comments":{"href":"https://api.github.com/repos/juju/charmstore/issues/451/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/charmstore/pulls/451/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/charmstore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/charmstore/pulls/451/commits"},"statuses":{"href":"https://api.github.com/repos/juju/charmstore/statuses/595a01e45bc8d379505f4a5ca30dd52ab8fa1aab"}}}}