{"action":"created","comment":{"url":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/comments/62018426","id":62018426,"diff_hunk":"@@ -86,7 +86,12 @@ def to_dict(self):\n         links = {}\n \n         for link in self:\n-            links.update(link.to_dict())\n+            if link.rel in links.keys():\n+                if isinstance(links[link.rel], dict):\n+                    links[link.rel] = [ links[link.rel] ]\n+               links[link.rel].append(link.to_dict()[link.rel])","path":"flask_hal/link.py","position":8,"original_position":8,"commit_id":"7cf5f4b208e536234e435aaa6c0db9e27e3323de","original_commit_id":"7cf5f4b208e536234e435aaa6c0db9e27e3323de","user":{"login":"radeklos","id":7483354,"avatar_url":"https://avatars.githubusercontent.com/u/7483354?v=3","gravatar_id":"","url":"https://api.github.com/users/radeklos","html_url":"https://github.com/radeklos","followers_url":"https://api.github.com/users/radeklos/followers","following_url":"https://api.github.com/users/radeklos/following{/other_user}","gists_url":"https://api.github.com/users/radeklos/gists{/gist_id}","starred_url":"https://api.github.com/users/radeklos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radeklos/subscriptions","organizations_url":"https://api.github.com/users/radeklos/orgs","repos_url":"https://api.github.com/users/radeklos/repos","events_url":"https://api.github.com/users/radeklos/events{/privacy}","received_events_url":"https://api.github.com/users/radeklos/received_events","type":"User","site_admin":false},"body":"One space is missing from the left.","created_at":"2016-05-04T10:29:06Z","updated_at":"2016-05-04T10:29:06Z","html_url":"https://github.com/thisissoon/Flask-HAL/pull/20#discussion_r62018426","pull_request_url":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/comments/62018426"},"html":{"href":"https://github.com/thisissoon/Flask-HAL/pull/20#discussion_r62018426"},"pull_request":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/20","id":68772437,"html_url":"https://github.com/thisissoon/Flask-HAL/pull/20","diff_url":"https://github.com/thisissoon/Flask-HAL/pull/20.diff","patch_url":"https://github.com/thisissoon/Flask-HAL/pull/20.patch","issue_url":"https://api.github.com/repos/thisissoon/Flask-HAL/issues/20","number":20,"state":"closed","locked":false,"title":"Develop","user":{"login":"brianfpeters","id":19175530,"avatar_url":"https://avatars.githubusercontent.com/u/19175530?v=3","gravatar_id":"","url":"https://api.github.com/users/brianfpeters","html_url":"https://github.com/brianfpeters","followers_url":"https://api.github.com/users/brianfpeters/followers","following_url":"https://api.github.com/users/brianfpeters/following{/other_user}","gists_url":"https://api.github.com/users/brianfpeters/gists{/gist_id}","starred_url":"https://api.github.com/users/brianfpeters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianfpeters/subscriptions","organizations_url":"https://api.github.com/users/brianfpeters/orgs","repos_url":"https://api.github.com/users/brianfpeters/repos","events_url":"https://api.github.com/users/brianfpeters/events{/privacy}","received_events_url":"https://api.github.com/users/brianfpeters/received_events","type":"User","site_admin":false},"body":"Fix Collection.to_dict() to support array of links with same link relation as per section 4.1.1 of draft RFC [https://tools.ietf.org/html/draft-kelly-json-hal-07].\r\n\r\nIf a link is the second to use a previous relation then the first link's body is moved inside a list and the second link's body is appended to that list.\r\n\r\nOtherwise use the dict.upate() function as before.\r\n","created_at":"2016-05-03T20:49:16Z","updated_at":"2016-05-04T10:29:06Z","closed_at":"2016-05-04T10:24:53Z","merged_at":null,"merge_commit_sha":"7fa195084ff720cf48d4fadd5ec327d70d4871c7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/20/commits","review_comments_url":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/20/comments","review_comment_url":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thisissoon/Flask-HAL/issues/20/comments","statuses_url":"https://api.github.com/repos/thisissoon/Flask-HAL/statuses/7cf5f4b208e536234e435aaa6c0db9e27e3323de","head":{"label":"brianfpeters:develop","ref":"develop","sha":"7cf5f4b208e536234e435aaa6c0db9e27e3323de","user":{"login":"brianfpeters","id":19175530,"avatar_url":"https://avatars.githubusercontent.com/u/19175530?v=3","gravatar_id":"","url":"https://api.github.com/users/brianfpeters","html_url":"https://github.com/brianfpeters","followers_url":"https://api.github.com/users/brianfpeters/followers","following_url":"https://api.github.com/users/brianfpeters/following{/other_user}","gists_url":"https://api.github.com/users/brianfpeters/gists{/gist_id}","starred_url":"https://api.github.com/users/brianfpeters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianfpeters/subscriptions","organizations_url":"https://api.github.com/users/brianfpeters/orgs","repos_url":"https://api.github.com/users/brianfpeters/repos","events_url":"https://api.github.com/users/brianfpeters/events{/privacy}","received_events_url":"https://api.github.com/users/brianfpeters/received_events","type":"User","site_admin":false},"repo":{"id":57999454,"name":"Flask-HAL","full_name":"brianfpeters/Flask-HAL","owner":{"login":"brianfpeters","id":19175530,"avatar_url":"https://avatars.githubusercontent.com/u/19175530?v=3","gravatar_id":"","url":"https://api.github.com/users/brianfpeters","html_url":"https://github.com/brianfpeters","followers_url":"https://api.github.com/users/brianfpeters/followers","following_url":"https://api.github.com/users/brianfpeters/following{/other_user}","gists_url":"https://api.github.com/users/brianfpeters/gists{/gist_id}","starred_url":"https://api.github.com/users/brianfpeters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianfpeters/subscriptions","organizations_url":"https://api.github.com/users/brianfpeters/orgs","repos_url":"https://api.github.com/users/brianfpeters/repos","events_url":"https://api.github.com/users/brianfpeters/events{/privacy}","received_events_url":"https://api.github.com/users/brianfpeters/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brianfpeters/Flask-HAL","description":"Flask Extension to easily add support for REST HATEOAS via the HAL Specification: https://tools.ietf.org/html/draft-kelly-json-hal-07","fork":true,"url":"https://api.github.com/repos/brianfpeters/Flask-HAL","forks_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/forks","keys_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/teams","hooks_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/hooks","issue_events_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/issues/events{/number}","events_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/events","assignees_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/assignees{/user}","branches_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/branches{/branch}","tags_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/tags","blobs_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/git/refs{/sha}","trees_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/statuses/{sha}","languages_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/languages","stargazers_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/stargazers","contributors_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/contributors","subscribers_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/subscribers","subscription_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/subscription","commits_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/commits{/sha}","git_commits_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/git/commits{/sha}","comments_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/comments{/number}","issue_comment_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/issues/comments{/number}","contents_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/contents/{+path}","compare_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/merges","archive_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/downloads","issues_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/issues{/number}","pulls_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/pulls{/number}","milestones_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/milestones{/number}","notifications_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/labels{/name}","releases_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/releases{/id}","deployments_url":"https://api.github.com/repos/brianfpeters/Flask-HAL/deployments","created_at":"2016-05-03T20:23:28Z","updated_at":"2016-05-03T20:23:29Z","pushed_at":"2016-05-04T10:21:19Z","git_url":"git://github.com/brianfpeters/Flask-HAL.git","ssh_url":"git@github.com:brianfpeters/Flask-HAL.git","clone_url":"https://github.com/brianfpeters/Flask-HAL.git","svn_url":"https://github.com/brianfpeters/Flask-HAL","homepage":null,"size":151,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thisissoon:develop","ref":"develop","sha":"2da9577788736cac181e47eaf1e6ca99dad8191a","user":{"login":"thisissoon","id":6976199,"avatar_url":"https://avatars.githubusercontent.com/u/6976199?v=3","gravatar_id":"","url":"https://api.github.com/users/thisissoon","html_url":"https://github.com/thisissoon","followers_url":"https://api.github.com/users/thisissoon/followers","following_url":"https://api.github.com/users/thisissoon/following{/other_user}","gists_url":"https://api.github.com/users/thisissoon/gists{/gist_id}","starred_url":"https://api.github.com/users/thisissoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thisissoon/subscriptions","organizations_url":"https://api.github.com/users/thisissoon/orgs","repos_url":"https://api.github.com/users/thisissoon/repos","events_url":"https://api.github.com/users/thisissoon/events{/privacy}","received_events_url":"https://api.github.com/users/thisissoon/received_events","type":"Organization","site_admin":false},"repo":{"id":40238626,"name":"Flask-HAL","full_name":"thisissoon/Flask-HAL","owner":{"login":"thisissoon","id":6976199,"avatar_url":"https://avatars.githubusercontent.com/u/6976199?v=3","gravatar_id":"","url":"https://api.github.com/users/thisissoon","html_url":"https://github.com/thisissoon","followers_url":"https://api.github.com/users/thisissoon/followers","following_url":"https://api.github.com/users/thisissoon/following{/other_user}","gists_url":"https://api.github.com/users/thisissoon/gists{/gist_id}","starred_url":"https://api.github.com/users/thisissoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thisissoon/subscriptions","organizations_url":"https://api.github.com/users/thisissoon/orgs","repos_url":"https://api.github.com/users/thisissoon/repos","events_url":"https://api.github.com/users/thisissoon/events{/privacy}","received_events_url":"https://api.github.com/users/thisissoon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thisissoon/Flask-HAL","description":"Flask Extension to easily add support for REST HATEOAS via the HAL Specification: https://tools.ietf.org/html/draft-kelly-json-hal-07","fork":false,"url":"https://api.github.com/repos/thisissoon/Flask-HAL","forks_url":"https://api.github.com/repos/thisissoon/Flask-HAL/forks","keys_url":"https://api.github.com/repos/thisissoon/Flask-HAL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thisissoon/Flask-HAL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thisissoon/Flask-HAL/teams","hooks_url":"https://api.github.com/repos/thisissoon/Flask-HAL/hooks","issue_events_url":"https://api.github.com/repos/thisissoon/Flask-HAL/issues/events{/number}","events_url":"https://api.github.com/repos/thisissoon/Flask-HAL/events","assignees_url":"https://api.github.com/repos/thisissoon/Flask-HAL/assignees{/user}","branches_url":"https://api.github.com/repos/thisissoon/Flask-HAL/branches{/branch}","tags_url":"https://api.github.com/repos/thisissoon/Flask-HAL/tags","blobs_url":"https://api.github.com/repos/thisissoon/Flask-HAL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thisissoon/Flask-HAL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thisissoon/Flask-HAL/git/refs{/sha}","trees_url":"https://api.github.com/repos/thisissoon/Flask-HAL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thisissoon/Flask-HAL/statuses/{sha}","languages_url":"https://api.github.com/repos/thisissoon/Flask-HAL/languages","stargazers_url":"https://api.github.com/repos/thisissoon/Flask-HAL/stargazers","contributors_url":"https://api.github.com/repos/thisissoon/Flask-HAL/contributors","subscribers_url":"https://api.github.com/repos/thisissoon/Flask-HAL/subscribers","subscription_url":"https://api.github.com/repos/thisissoon/Flask-HAL/subscription","commits_url":"https://api.github.com/repos/thisissoon/Flask-HAL/commits{/sha}","git_commits_url":"https://api.github.com/repos/thisissoon/Flask-HAL/git/commits{/sha}","comments_url":"https://api.github.com/repos/thisissoon/Flask-HAL/comments{/number}","issue_comment_url":"https://api.github.com/repos/thisissoon/Flask-HAL/issues/comments{/number}","contents_url":"https://api.github.com/repos/thisissoon/Flask-HAL/contents/{+path}","compare_url":"https://api.github.com/repos/thisissoon/Flask-HAL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thisissoon/Flask-HAL/merges","archive_url":"https://api.github.com/repos/thisissoon/Flask-HAL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thisissoon/Flask-HAL/downloads","issues_url":"https://api.github.com/repos/thisissoon/Flask-HAL/issues{/number}","pulls_url":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls{/number}","milestones_url":"https://api.github.com/repos/thisissoon/Flask-HAL/milestones{/number}","notifications_url":"https://api.github.com/repos/thisissoon/Flask-HAL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thisissoon/Flask-HAL/labels{/name}","releases_url":"https://api.github.com/repos/thisissoon/Flask-HAL/releases{/id}","deployments_url":"https://api.github.com/repos/thisissoon/Flask-HAL/deployments","created_at":"2015-08-05T10:11:51Z","updated_at":"2015-08-10T11:06:55Z","pushed_at":"2016-05-04T10:21:20Z","git_url":"git://github.com/thisissoon/Flask-HAL.git","ssh_url":"git@github.com:thisissoon/Flask-HAL.git","clone_url":"https://github.com/thisissoon/Flask-HAL.git","svn_url":"https://github.com/thisissoon/Flask-HAL","homepage":null,"size":152,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/20"},"html":{"href":"https://github.com/thisissoon/Flask-HAL/pull/20"},"issue":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/issues/20"},"comments":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/thisissoon/Flask-HAL/statuses/7cf5f4b208e536234e435aaa6c0db9e27e3323de"}}}}