payload: {"action":"created","comment":{"url":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/comments/336068029","pull_request_review_id":303338737,"id":336068029,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzNjA2ODAyOQ==","diff_hunk":"@@ -101,12 +101,15 @@ class MetadataService {\n             logger.error('Error updating metadata');\n             throw new MetadataNotFound(`Metadata of resource ${resource.type}: ${resource.id} doesn't exist`);\n         }\n+\n+        const hasValue = value => value !== undefined && value !== null;","path":"app/src/services/metadata.service.js","position":5,"original_position":5,"commit_id":"d2b8de84d7d05a65cf00b948e022c19eac0984d4","original_commit_id":"d2b8de84d7d05a65cf00b948e022c19eac0984d4","user":{"login":"clementprdhomme","id":6073968,"node_id":"MDQ6VXNlcjYwNzM5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/6073968?v=4","gravatar_id":"","url":"https://api.github.com/users/clementprdhomme","html_url":"https://github.com/clementprdhomme","followers_url":"https://api.github.com/users/clementprdhomme/followers","following_url":"https://api.github.com/users/clementprdhomme/following{/other_user}","gists_url":"https://api.github.com/users/clementprdhomme/gists{/gist_id}","starred_url":"https://api.github.com/users/clementprdhomme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clementprdhomme/subscriptions","organizations_url":"https://api.github.com/users/clementprdhomme/orgs","repos_url":"https://api.github.com/users/clementprdhomme/repos","events_url":"https://api.github.com/users/clementprdhomme/events{/privacy}","received_events_url":"https://api.github.com/users/clementprdhomme/received_events","type":"User","site_admin":false},"body":"There is: https://lodash.com/docs/4.17.15#isNil\r\n\r\nI'll update the PR.","created_at":"2019-10-17T15:16:12Z","updated_at":"2019-10-17T15:16:12Z","html_url":"https://github.com/resource-watch/rw_metadata/pull/18#discussion_r336068029","pull_request_url":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/18","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/comments/336068029"},"html":{"href":"https://github.com/resource-watch/rw_metadata/pull/18#discussion_r336068029"},"pull_request":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/18"}},"in_reply_to_id":336041936},"pull_request":{"url":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/18","id":329282771,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI5MjgyNzcx","html_url":"https://github.com/resource-watch/rw_metadata/pull/18","diff_url":"https://github.com/resource-watch/rw_metadata/pull/18.diff","patch_url":"https://github.com/resource-watch/rw_metadata/pull/18.patch","issue_url":"https://api.github.com/repos/resource-watch/rw_metadata/issues/18","number":18,"state":"open","locked":false,"title":"Fix a bug where empty values couldn't be assigned to the string fields","user":{"login":"clementprdhomme","id":6073968,"node_id":"MDQ6VXNlcjYwNzM5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/6073968?v=4","gravatar_id":"","url":"https://api.github.com/users/clementprdhomme","html_url":"https://github.com/clementprdhomme","followers_url":"https://api.github.com/users/clementprdhomme/followers","following_url":"https://api.github.com/users/clementprdhomme/following{/other_user}","gists_url":"https://api.github.com/users/clementprdhomme/gists{/gist_id}","starred_url":"https://api.github.com/users/clementprdhomme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clementprdhomme/subscriptions","organizations_url":"https://api.github.com/users/clementprdhomme/orgs","repos_url":"https://api.github.com/users/clementprdhomme/repos","events_url":"https://api.github.com/users/clementprdhomme/events{/privacy}","received_events_url":"https://api.github.com/users/clementprdhomme/received_events","type":"User","site_admin":false},"body":"This PR fixes a bug where it would be impossible to assign empty values (`''`) to the string fields of a metadata object, when updating it.\r\n\r\n## Testing instructions\r\n\r\nA regression test has been written for this bug. Run `./metadata.sh test` to test the changes.\r\n\r\n## Pivotal tracker\r\n\r\nNot tracked.","created_at":"2019-10-17T14:07:58Z","updated_at":"2019-10-17T15:16:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb579a58ed219cf5928abd356fa1193ab5858db2","assignee":{"login":"clementprdhomme","id":6073968,"node_id":"MDQ6VXNlcjYwNzM5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/6073968?v=4","gravatar_id":"","url":"https://api.github.com/users/clementprdhomme","html_url":"https://github.com/clementprdhomme","followers_url":"https://api.github.com/users/clementprdhomme/followers","following_url":"https://api.github.com/users/clementprdhomme/following{/other_user}","gists_url":"https://api.github.com/users/clementprdhomme/gists{/gist_id}","starred_url":"https://api.github.com/users/clementprdhomme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clementprdhomme/subscriptions","organizations_url":"https://api.github.com/users/clementprdhomme/orgs","repos_url":"https://api.github.com/users/clementprdhomme/repos","events_url":"https://api.github.com/users/clementprdhomme/events{/privacy}","received_events_url":"https://api.github.com/users/clementprdhomme/received_events","type":"User","site_admin":false},"assignees":[{"login":"clementprdhomme","id":6073968,"node_id":"MDQ6VXNlcjYwNzM5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/6073968?v=4","gravatar_id":"","url":"https://api.github.com/users/clementprdhomme","html_url":"https://github.com/clementprdhomme","followers_url":"https://api.github.com/users/clementprdhomme/followers","following_url":"https://api.github.com/users/clementprdhomme/following{/other_user}","gists_url":"https://api.github.com/users/clementprdhomme/gists{/gist_id}","starred_url":"https://api.github.com/users/clementprdhomme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clementprdhomme/subscriptions","organizations_url":"https://api.github.com/users/clementprdhomme/orgs","repos_url":"https://api.github.com/users/clementprdhomme/repos","events_url":"https://api.github.com/users/clementprdhomme/events{/privacy}","received_events_url":"https://api.github.com/users/clementprdhomme/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/18/commits","review_comments_url":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/18/comments","review_comment_url":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/resource-watch/rw_metadata/issues/18/comments","statuses_url":"https://api.github.com/repos/resource-watch/rw_metadata/statuses/d2b8de84d7d05a65cf00b948e022c19eac0984d4","head":{"label":"resource-watch:bug/metadata-empty-fields","ref":"bug/metadata-empty-fields","sha":"d2b8de84d7d05a65cf00b948e022c19eac0984d4","user":{"login":"resource-watch","id":18593980,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NTkzOTgw","avatar_url":"https://avatars0.githubusercontent.com/u/18593980?v=4","gravatar_id":"","url":"https://api.github.com/users/resource-watch","html_url":"https://github.com/resource-watch","followers_url":"https://api.github.com/users/resource-watch/followers","following_url":"https://api.github.com/users/resource-watch/following{/other_user}","gists_url":"https://api.github.com/users/resource-watch/gists{/gist_id}","starred_url":"https://api.github.com/users/resource-watch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resource-watch/subscriptions","organizations_url":"https://api.github.com/users/resource-watch/orgs","repos_url":"https://api.github.com/users/resource-watch/repos","events_url":"https://api.github.com/users/resource-watch/events{/privacy}","received_events_url":"https://api.github.com/users/resource-watch/received_events","type":"Organization","site_admin":false},"repo":{"id":124221083,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQyMjEwODM=","name":"rw_metadata","full_name":"resource-watch/rw_metadata","private":false,"owner":{"login":"resource-watch","id":18593980,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NTkzOTgw","avatar_url":"https://avatars0.githubusercontent.com/u/18593980?v=4","gravatar_id":"","url":"https://api.github.com/users/resource-watch","html_url":"https://github.com/resource-watch","followers_url":"https://api.github.com/users/resource-watch/followers","following_url":"https://api.github.com/users/resource-watch/following{/other_user}","gists_url":"https://api.github.com/users/resource-watch/gists{/gist_id}","starred_url":"https://api.github.com/users/resource-watch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resource-watch/subscriptions","organizations_url":"https://api.github.com/users/resource-watch/orgs","repos_url":"https://api.github.com/users/resource-watch/repos","events_url":"https://api.github.com/users/resource-watch/events{/privacy}","received_events_url":"https://api.github.com/users/resource-watch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/resource-watch/rw_metadata","description":null,"fork":true,"url":"https://api.github.com/repos/resource-watch/rw_metadata","forks_url":"https://api.github.com/repos/resource-watch/rw_metadata/forks","keys_url":"https://api.github.com/repos/resource-watch/rw_metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resource-watch/rw_metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resource-watch/rw_metadata/teams","hooks_url":"https://api.github.com/repos/resource-watch/rw_metadata/hooks","issue_events_url":"https://api.github.com/repos/resource-watch/rw_metadata/issues/events{/number}","events_url":"https://api.github.com/repos/resource-watch/rw_metadata/events","assignees_url":"https://api.github.com/repos/resource-watch/rw_metadata/assignees{/user}","branches_url":"https://api.github.com/repos/resource-watch/rw_metadata/branches{/branch}","tags_url":"https://api.github.com/repos/resource-watch/rw_metadata/tags","blobs_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resource-watch/rw_metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/resource-watch/rw_metadata/languages","stargazers_url":"https://api.github.com/repos/resource-watch/rw_metadata/stargazers","contributors_url":"https://api.github.com/repos/resource-watch/rw_metadata/contributors","subscribers_url":"https://api.github.com/repos/resource-watch/rw_metadata/subscribers","subscription_url":"https://api.github.com/repos/resource-watch/rw_metadata/subscription","commits_url":"https://api.github.com/repos/resource-watch/rw_metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/resource-watch/rw_metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/resource-watch/rw_metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/resource-watch/rw_metadata/contents/{+path}","compare_url":"https://api.github.com/repos/resource-watch/rw_metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resource-watch/rw_metadata/merges","archive_url":"https://api.github.com/repos/resource-watch/rw_metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resource-watch/rw_metadata/downloads","issues_url":"https://api.github.com/repos/resource-watch/rw_metadata/issues{/number}","pulls_url":"https://api.github.com/repos/resource-watch/rw_metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/resource-watch/rw_metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/resource-watch/rw_metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resource-watch/rw_metadata/labels{/name}","releases_url":"https://api.github.com/repos/resource-watch/rw_metadata/releases{/id}","deployments_url":"https://api.github.com/repos/resource-watch/rw_metadata/deployments","created_at":"2018-03-07T10:43:48Z","updated_at":"2019-10-17T12:15:02Z","pushed_at":"2019-10-17T14:07:59Z","git_url":"git://github.com/resource-watch/rw_metadata.git","ssh_url":"git@github.com:resource-watch/rw_metadata.git","clone_url":"https://github.com/resource-watch/rw_metadata.git","svn_url":"https://github.com/resource-watch/rw_metadata","homepage":null,"size":529,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"resource-watch:develop","ref":"develop","sha":"c60f60270a168bb990079d9b731db155a5891a54","user":{"login":"resource-watch","id":18593980,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NTkzOTgw","avatar_url":"https://avatars0.githubusercontent.com/u/18593980?v=4","gravatar_id":"","url":"https://api.github.com/users/resource-watch","html_url":"https://github.com/resource-watch","followers_url":"https://api.github.com/users/resource-watch/followers","following_url":"https://api.github.com/users/resource-watch/following{/other_user}","gists_url":"https://api.github.com/users/resource-watch/gists{/gist_id}","starred_url":"https://api.github.com/users/resource-watch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resource-watch/subscriptions","organizations_url":"https://api.github.com/users/resource-watch/orgs","repos_url":"https://api.github.com/users/resource-watch/repos","events_url":"https://api.github.com/users/resource-watch/events{/privacy}","received_events_url":"https://api.github.com/users/resource-watch/received_events","type":"Organization","site_admin":false},"repo":{"id":124221083,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQyMjEwODM=","name":"rw_metadata","full_name":"resource-watch/rw_metadata","private":false,"owner":{"login":"resource-watch","id":18593980,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NTkzOTgw","avatar_url":"https://avatars0.githubusercontent.com/u/18593980?v=4","gravatar_id":"","url":"https://api.github.com/users/resource-watch","html_url":"https://github.com/resource-watch","followers_url":"https://api.github.com/users/resource-watch/followers","following_url":"https://api.github.com/users/resource-watch/following{/other_user}","gists_url":"https://api.github.com/users/resource-watch/gists{/gist_id}","starred_url":"https://api.github.com/users/resource-watch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resource-watch/subscriptions","organizations_url":"https://api.github.com/users/resource-watch/orgs","repos_url":"https://api.github.com/users/resource-watch/repos","events_url":"https://api.github.com/users/resource-watch/events{/privacy}","received_events_url":"https://api.github.com/users/resource-watch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/resource-watch/rw_metadata","description":null,"fork":true,"url":"https://api.github.com/repos/resource-watch/rw_metadata","forks_url":"https://api.github.com/repos/resource-watch/rw_metadata/forks","keys_url":"https://api.github.com/repos/resource-watch/rw_metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resource-watch/rw_metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resource-watch/rw_metadata/teams","hooks_url":"https://api.github.com/repos/resource-watch/rw_metadata/hooks","issue_events_url":"https://api.github.com/repos/resource-watch/rw_metadata/issues/events{/number}","events_url":"https://api.github.com/repos/resource-watch/rw_metadata/events","assignees_url":"https://api.github.com/repos/resource-watch/rw_metadata/assignees{/user}","branches_url":"https://api.github.com/repos/resource-watch/rw_metadata/branches{/branch}","tags_url":"https://api.github.com/repos/resource-watch/rw_metadata/tags","blobs_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resource-watch/rw_metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/resource-watch/rw_metadata/languages","stargazers_url":"https://api.github.com/repos/resource-watch/rw_metadata/stargazers","contributors_url":"https://api.github.com/repos/resource-watch/rw_metadata/contributors","subscribers_url":"https://api.github.com/repos/resource-watch/rw_metadata/subscribers","subscription_url":"https://api.github.com/repos/resource-watch/rw_metadata/subscription","commits_url":"https://api.github.com/repos/resource-watch/rw_metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/resource-watch/rw_metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/resource-watch/rw_metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/resource-watch/rw_metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/resource-watch/rw_metadata/contents/{+path}","compare_url":"https://api.github.com/repos/resource-watch/rw_metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resource-watch/rw_metadata/merges","archive_url":"https://api.github.com/repos/resource-watch/rw_metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resource-watch/rw_metadata/downloads","issues_url":"https://api.github.com/repos/resource-watch/rw_metadata/issues{/number}","pulls_url":"https://api.github.com/repos/resource-watch/rw_metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/resource-watch/rw_metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/resource-watch/rw_metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resource-watch/rw_metadata/labels{/name}","releases_url":"https://api.github.com/repos/resource-watch/rw_metadata/releases{/id}","deployments_url":"https://api.github.com/repos/resource-watch/rw_metadata/deployments","created_at":"2018-03-07T10:43:48Z","updated_at":"2019-10-17T12:15:02Z","pushed_at":"2019-10-17T14:07:59Z","git_url":"git://github.com/resource-watch/rw_metadata.git","ssh_url":"git@github.com:resource-watch/rw_metadata.git","clone_url":"https://github.com/resource-watch/rw_metadata.git","svn_url":"https://github.com/resource-watch/rw_metadata","homepage":null,"size":529,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/18"},"html":{"href":"https://github.com/resource-watch/rw_metadata/pull/18"},"issue":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/issues/18"},"comments":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/resource-watch/rw_metadata/statuses/d2b8de84d7d05a65cf00b948e022c19eac0984d4"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"clementprdhomme"}}