{"action":"created","comment":{"url":"https://api.github.com/repos/opendatateam/udata/pulls/comments/117213782","pull_request_review_id":38899677,"id":117213782,"diff_hunk":"@@ -22,16 +22,10 @@ export default class Reuse extends Model {\n      * Create or update the given reuse\n      */\n     save(on_error) {\n-        let ep, args;\n         if (this.id) {\n-            ep = 'reuses.update_reuse';\n-            args = {payload: this, reuse: this.id,};\n+            return this.update(this, this.on_fetched, on_error);\n         }\n-        else {\n-            ep = 'reuses.create_reuse';\n-            args = {payload: this,};\n-        }\n-        this.$api(ep, args, this.on_fetched, on_error);\n+        this.$api('reuses.create_reuse', {payload: this}, this.on_fetched, on_error);","path":"js/models/reuse.js","position":15,"original_position":15,"commit_id":"45baee7ce53f3fe1bc9dddc11502982d806501d4","original_commit_id":"fbe0b1d4e467c561f334ec1a004b00e9ed191fde","user":{"login":"noirbizarre","id":15725,"avatar_url":"https://avatars3.githubusercontent.com/u/15725?v=3","gravatar_id":"","url":"https://api.github.com/users/noirbizarre","html_url":"https://github.com/noirbizarre","followers_url":"https://api.github.com/users/noirbizarre/followers","following_url":"https://api.github.com/users/noirbizarre/following{/other_user}","gists_url":"https://api.github.com/users/noirbizarre/gists{/gist_id}","starred_url":"https://api.github.com/users/noirbizarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noirbizarre/subscriptions","organizations_url":"https://api.github.com/users/noirbizarre/orgs","repos_url":"https://api.github.com/users/noirbizarre/repos","events_url":"https://api.github.com/users/noirbizarre/events{/privacy}","received_events_url":"https://api.github.com/users/noirbizarre/received_events","type":"User","site_admin":false},"body":"same as above","created_at":"2017-05-18T10:32:17Z","updated_at":"2017-05-18T10:32:18Z","html_url":"https://github.com/opendatateam/udata/pull/910#discussion_r117213782","pull_request_url":"https://api.github.com/repos/opendatateam/udata/pulls/910","_links":{"self":{"href":"https://api.github.com/repos/opendatateam/udata/pulls/comments/117213782"},"html":{"href":"https://github.com/opendatateam/udata/pull/910#discussion_r117213782"},"pull_request":{"href":"https://api.github.com/repos/opendatateam/udata/pulls/910"}}},"pull_request":{"url":"https://api.github.com/repos/opendatateam/udata/pulls/910","id":121083796,"html_url":"https://github.com/opendatateam/udata/pull/910","diff_url":"https://github.com/opendatateam/udata/pull/910.diff","patch_url":"https://github.com/opendatateam/udata/pull/910.patch","issue_url":"https://api.github.com/repos/opendatateam/udata/issues/910","number":910,"state":"open","locked":false,"title":"Fix js Model.save not updating","user":{"login":"noirbizarre","id":15725,"avatar_url":"https://avatars3.githubusercontent.com/u/15725?v=3","gravatar_id":"","url":"https://api.github.com/users/noirbizarre","html_url":"https://github.com/noirbizarre","followers_url":"https://api.github.com/users/noirbizarre/followers","following_url":"https://api.github.com/users/noirbizarre/following{/other_user}","gists_url":"https://api.github.com/users/noirbizarre/gists{/gist_id}","starred_url":"https://api.github.com/users/noirbizarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noirbizarre/subscriptions","organizations_url":"https://api.github.com/users/noirbizarre/orgs","repos_url":"https://api.github.com/users/noirbizarre/repos","events_url":"https://api.github.com/users/noirbizarre/events{/privacy}","received_events_url":"https://api.github.com/users/noirbizarre/received_events","type":"User","site_admin":false},"body":"This PR fix some model `save()` method not performing update (and so breaking the ability for workflow to go back and forth on the steps editing this objects).\r\n\r\nThis is the very first step toward fully working workflows (cc @vinyll )\r\n\r\nFor the futur, it would be interesting to normalize the create/save/update methods on models.","created_at":"2017-05-17T15:15:55Z","updated_at":"2017-05-18T10:32:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2cf2b5c87bbde31e9105931950309d4075d2743","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jdesboeufs","id":1231232,"avatar_url":"https://avatars1.githubusercontent.com/u/1231232?v=3","gravatar_id":"","url":"https://api.github.com/users/jdesboeufs","html_url":"https://github.com/jdesboeufs","followers_url":"https://api.github.com/users/jdesboeufs/followers","following_url":"https://api.github.com/users/jdesboeufs/following{/other_user}","gists_url":"https://api.github.com/users/jdesboeufs/gists{/gist_id}","starred_url":"https://api.github.com/users/jdesboeufs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdesboeufs/subscriptions","organizations_url":"https://api.github.com/users/jdesboeufs/orgs","repos_url":"https://api.github.com/users/jdesboeufs/repos","events_url":"https://api.github.com/users/jdesboeufs/events{/privacy}","received_events_url":"https://api.github.com/users/jdesboeufs/received_events","type":"User","site_admin":false},{"login":"odtvince","id":11269941,"avatar_url":"https://avatars1.githubusercontent.com/u/11269941?v=3","gravatar_id":"","url":"https://api.github.com/users/odtvince","html_url":"https://github.com/odtvince","followers_url":"https://api.github.com/users/odtvince/followers","following_url":"https://api.github.com/users/odtvince/following{/other_user}","gists_url":"https://api.github.com/users/odtvince/gists{/gist_id}","starred_url":"https://api.github.com/users/odtvince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odtvince/subscriptions","organizations_url":"https://api.github.com/users/odtvince/orgs","repos_url":"https://api.github.com/users/odtvince/repos","events_url":"https://api.github.com/users/odtvince/events{/privacy}","received_events_url":"https://api.github.com/users/odtvince/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/opendatateam/udata/milestones/15","html_url":"https://github.com/opendatateam/udata/milestone/15","labels_url":"https://api.github.com/repos/opendatateam/udata/milestones/15/labels","id":2527028,"number":15,"title":"1.0.11","description":"","creator":{"login":"noirbizarre","id":15725,"avatar_url":"https://avatars3.githubusercontent.com/u/15725?v=3","gravatar_id":"","url":"https://api.github.com/users/noirbizarre","html_url":"https://github.com/noirbizarre","followers_url":"https://api.github.com/users/noirbizarre/followers","following_url":"https://api.github.com/users/noirbizarre/following{/other_user}","gists_url":"https://api.github.com/users/noirbizarre/gists{/gist_id}","starred_url":"https://api.github.com/users/noirbizarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noirbizarre/subscriptions","organizations_url":"https://api.github.com/users/noirbizarre/orgs","repos_url":"https://api.github.com/users/noirbizarre/repos","events_url":"https://api.github.com/users/noirbizarre/events{/privacy}","received_events_url":"https://api.github.com/users/noirbizarre/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2017-05-17T14:38:41Z","updated_at":"2017-05-18T10:28:50Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/opendatateam/udata/pulls/910/commits","review_comments_url":"https://api.github.com/repos/opendatateam/udata/pulls/910/comments","review_comment_url":"https://api.github.com/repos/opendatateam/udata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opendatateam/udata/issues/910/comments","statuses_url":"https://api.github.com/repos/opendatateam/udata/statuses/45baee7ce53f3fe1bc9dddc11502982d806501d4","head":{"label":"noirbizarre:fix-js-model-save","ref":"fix-js-model-save","sha":"45baee7ce53f3fe1bc9dddc11502982d806501d4","user":{"login":"noirbizarre","id":15725,"avatar_url":"https://avatars3.githubusercontent.com/u/15725?v=3","gravatar_id":"","url":"https://api.github.com/users/noirbizarre","html_url":"https://github.com/noirbizarre","followers_url":"https://api.github.com/users/noirbizarre/followers","following_url":"https://api.github.com/users/noirbizarre/following{/other_user}","gists_url":"https://api.github.com/users/noirbizarre/gists{/gist_id}","starred_url":"https://api.github.com/users/noirbizarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noirbizarre/subscriptions","organizations_url":"https://api.github.com/users/noirbizarre/orgs","repos_url":"https://api.github.com/users/noirbizarre/repos","events_url":"https://api.github.com/users/noirbizarre/events{/privacy}","received_events_url":"https://api.github.com/users/noirbizarre/received_events","type":"User","site_admin":false},"repo":{"id":45184052,"name":"udata","full_name":"noirbizarre/udata","owner":{"login":"noirbizarre","id":15725,"avatar_url":"https://avatars3.githubusercontent.com/u/15725?v=3","gravatar_id":"","url":"https://api.github.com/users/noirbizarre","html_url":"https://github.com/noirbizarre","followers_url":"https://api.github.com/users/noirbizarre/followers","following_url":"https://api.github.com/users/noirbizarre/following{/other_user}","gists_url":"https://api.github.com/users/noirbizarre/gists{/gist_id}","starred_url":"https://api.github.com/users/noirbizarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noirbizarre/subscriptions","organizations_url":"https://api.github.com/users/noirbizarre/orgs","repos_url":"https://api.github.com/users/noirbizarre/repos","events_url":"https://api.github.com/users/noirbizarre/events{/privacy}","received_events_url":"https://api.github.com/users/noirbizarre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noirbizarre/udata","description":"Social data platform","fork":true,"url":"https://api.github.com/repos/noirbizarre/udata","forks_url":"https://api.github.com/repos/noirbizarre/udata/forks","keys_url":"https://api.github.com/repos/noirbizarre/udata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noirbizarre/udata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noirbizarre/udata/teams","hooks_url":"https://api.github.com/repos/noirbizarre/udata/hooks","issue_events_url":"https://api.github.com/repos/noirbizarre/udata/issues/events{/number}","events_url":"https://api.github.com/repos/noirbizarre/udata/events","assignees_url":"https://api.github.com/repos/noirbizarre/udata/assignees{/user}","branches_url":"https://api.github.com/repos/noirbizarre/udata/branches{/branch}","tags_url":"https://api.github.com/repos/noirbizarre/udata/tags","blobs_url":"https://api.github.com/repos/noirbizarre/udata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noirbizarre/udata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noirbizarre/udata/git/refs{/sha}","trees_url":"https://api.github.com/repos/noirbizarre/udata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noirbizarre/udata/statuses/{sha}","languages_url":"https://api.github.com/repos/noirbizarre/udata/languages","stargazers_url":"https://api.github.com/repos/noirbizarre/udata/stargazers","contributors_url":"https://api.github.com/repos/noirbizarre/udata/contributors","subscribers_url":"https://api.github.com/repos/noirbizarre/udata/subscribers","subscription_url":"https://api.github.com/repos/noirbizarre/udata/subscription","commits_url":"https://api.github.com/repos/noirbizarre/udata/commits{/sha}","git_commits_url":"https://api.github.com/repos/noirbizarre/udata/git/commits{/sha}","comments_url":"https://api.github.com/repos/noirbizarre/udata/comments{/number}","issue_comment_url":"https://api.github.com/repos/noirbizarre/udata/issues/comments{/number}","contents_url":"https://api.github.com/repos/noirbizarre/udata/contents/{+path}","compare_url":"https://api.github.com/repos/noirbizarre/udata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noirbizarre/udata/merges","archive_url":"https://api.github.com/repos/noirbizarre/udata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noirbizarre/udata/downloads","issues_url":"https://api.github.com/repos/noirbizarre/udata/issues{/number}","pulls_url":"https://api.github.com/repos/noirbizarre/udata/pulls{/number}","milestones_url":"https://api.github.com/repos/noirbizarre/udata/milestones{/number}","notifications_url":"https://api.github.com/repos/noirbizarre/udata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noirbizarre/udata/labels{/name}","releases_url":"https://api.github.com/repos/noirbizarre/udata/releases{/id}","deployments_url":"https://api.github.com/repos/noirbizarre/udata/deployments","created_at":"2015-10-29T13:15:39Z","updated_at":"2016-05-17T14:50:39Z","pushed_at":"2017-05-18T10:30:14Z","git_url":"git://github.com/noirbizarre/udata.git","ssh_url":"git@github.com:noirbizarre/udata.git","clone_url":"https://github.com/noirbizarre/udata.git","svn_url":"https://github.com/noirbizarre/udata","homepage":null,"size":8358,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"master"}},"base":{"label":"opendatateam:master","ref":"master","sha":"2102393987ad279c346490f5e74b4feecdbcbe81","user":{"login":"opendatateam","id":19330690,"avatar_url":"https://avatars1.githubusercontent.com/u/19330690?v=3","gravatar_id":"","url":"https://api.github.com/users/opendatateam","html_url":"https://github.com/opendatateam","followers_url":"https://api.github.com/users/opendatateam/followers","following_url":"https://api.github.com/users/opendatateam/following{/other_user}","gists_url":"https://api.github.com/users/opendatateam/gists{/gist_id}","starred_url":"https://api.github.com/users/opendatateam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opendatateam/subscriptions","organizations_url":"https://api.github.com/users/opendatateam/orgs","repos_url":"https://api.github.com/users/opendatateam/repos","events_url":"https://api.github.com/users/opendatateam/events{/privacy}","received_events_url":"https://api.github.com/users/opendatateam/received_events","type":"Organization","site_admin":false},"repo":{"id":19141754,"name":"udata","full_name":"opendatateam/udata","owner":{"login":"opendatateam","id":19330690,"avatar_url":"https://avatars1.githubusercontent.com/u/19330690?v=3","gravatar_id":"","url":"https://api.github.com/users/opendatateam","html_url":"https://github.com/opendatateam","followers_url":"https://api.github.com/users/opendatateam/followers","following_url":"https://api.github.com/users/opendatateam/following{/other_user}","gists_url":"https://api.github.com/users/opendatateam/gists{/gist_id}","starred_url":"https://api.github.com/users/opendatateam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opendatateam/subscriptions","organizations_url":"https://api.github.com/users/opendatateam/orgs","repos_url":"https://api.github.com/users/opendatateam/repos","events_url":"https://api.github.com/users/opendatateam/events{/privacy}","received_events_url":"https://api.github.com/users/opendatateam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opendatateam/udata","description":"Customizable and skinnable social platform dedicated to (open)data.","fork":false,"url":"https://api.github.com/repos/opendatateam/udata","forks_url":"https://api.github.com/repos/opendatateam/udata/forks","keys_url":"https://api.github.com/repos/opendatateam/udata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opendatateam/udata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opendatateam/udata/teams","hooks_url":"https://api.github.com/repos/opendatateam/udata/hooks","issue_events_url":"https://api.github.com/repos/opendatateam/udata/issues/events{/number}","events_url":"https://api.github.com/repos/opendatateam/udata/events","assignees_url":"https://api.github.com/repos/opendatateam/udata/assignees{/user}","branches_url":"https://api.github.com/repos/opendatateam/udata/branches{/branch}","tags_url":"https://api.github.com/repos/opendatateam/udata/tags","blobs_url":"https://api.github.com/repos/opendatateam/udata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opendatateam/udata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opendatateam/udata/git/refs{/sha}","trees_url":"https://api.github.com/repos/opendatateam/udata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opendatateam/udata/statuses/{sha}","languages_url":"https://api.github.com/repos/opendatateam/udata/languages","stargazers_url":"https://api.github.com/repos/opendatateam/udata/stargazers","contributors_url":"https://api.github.com/repos/opendatateam/udata/contributors","subscribers_url":"https://api.github.com/repos/opendatateam/udata/subscribers","subscription_url":"https://api.github.com/repos/opendatateam/udata/subscription","commits_url":"https://api.github.com/repos/opendatateam/udata/commits{/sha}","git_commits_url":"https://api.github.com/repos/opendatateam/udata/git/commits{/sha}","comments_url":"https://api.github.com/repos/opendatateam/udata/comments{/number}","issue_comment_url":"https://api.github.com/repos/opendatateam/udata/issues/comments{/number}","contents_url":"https://api.github.com/repos/opendatateam/udata/contents/{+path}","compare_url":"https://api.github.com/repos/opendatateam/udata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opendatateam/udata/merges","archive_url":"https://api.github.com/repos/opendatateam/udata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opendatateam/udata/downloads","issues_url":"https://api.github.com/repos/opendatateam/udata/issues{/number}","pulls_url":"https://api.github.com/repos/opendatateam/udata/pulls{/number}","milestones_url":"https://api.github.com/repos/opendatateam/udata/milestones{/number}","notifications_url":"https://api.github.com/repos/opendatateam/udata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opendatateam/udata/labels{/name}","releases_url":"https://api.github.com/repos/opendatateam/udata/releases{/id}","deployments_url":"https://api.github.com/repos/opendatateam/udata/deployments","created_at":"2014-04-25T09:57:34Z","updated_at":"2017-05-10T14:07:48Z","pushed_at":"2017-05-18T10:30:16Z","git_url":"git://github.com/opendatateam/udata.git","ssh_url":"git@github.com:opendatateam/udata.git","clone_url":"https://github.com/opendatateam/udata.git","svn_url":"https://github.com/opendatateam/udata","homepage":"http://udata.readthedocs.org","size":8160,"stargazers_count":72,"watchers_count":72,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":57,"forks":30,"open_issues":57,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opendatateam/udata/pulls/910"},"html":{"href":"https://github.com/opendatateam/udata/pull/910"},"issue":{"href":"https://api.github.com/repos/opendatateam/udata/issues/910"},"comments":{"href":"https://api.github.com/repos/opendatateam/udata/issues/910/comments"},"review_comments":{"href":"https://api.github.com/repos/opendatateam/udata/pulls/910/comments"},"review_comment":{"href":"https://api.github.com/repos/opendatateam/udata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opendatateam/udata/pulls/910/commits"},"statuses":{"href":"https://api.github.com/repos/opendatateam/udata/statuses/45baee7ce53f3fe1bc9dddc11502982d806501d4"}}}}
{"actor":{"display_login":"noirbizarre"}}