{"action":"created","comment":{"url":"https://api.github.com/repos/google/ggrc-core/pulls/comments/77540658","id":77540658,"diff_hunk":"@@ -112,6 +112,10 @@ def validate_multi_choice_options(self, _, value):\n     \"\"\"Strip spaces around options in dropdown options.\"\"\"\n     # pylint: disable=no-self-use\n     # TODO: this should be \"if value is not None\" to disallow value == \"\"\n+\n+    if self.attribute_type != self.ValidTypes.DROPDOWN:","path":"src/ggrc/models/custom_attribute_definition.py","position":5,"original_position":5,"commit_id":"c4e6caaf44492c9f4341567b56468d088f3c0a06","original_commit_id":"c4e6caaf44492c9f4341567b56468d088f3c0a06","user":{"login":"zidarsk8","id":566311,"avatar_url":"https://avatars.githubusercontent.com/u/566311?v=3","gravatar_id":"","url":"https://api.github.com/users/zidarsk8","html_url":"https://github.com/zidarsk8","followers_url":"https://api.github.com/users/zidarsk8/followers","following_url":"https://api.github.com/users/zidarsk8/following{/other_user}","gists_url":"https://api.github.com/users/zidarsk8/gists{/gist_id}","starred_url":"https://api.github.com/users/zidarsk8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zidarsk8/subscriptions","organizations_url":"https://api.github.com/users/zidarsk8/orgs","repos_url":"https://api.github.com/users/zidarsk8/repos","events_url":"https://api.github.com/users/zidarsk8/events{/privacy}","received_events_url":"https://api.github.com/users/zidarsk8/received_events","type":"User","site_admin":false},"body":"You can not rely on `attribute_type` to be set at the time when you're setting the current field (no order is speficied)\r\n\r\nWhat you need to do here, if user sets this value it should not be an empty string. None is the only valid falcy value that this validator shoud pass. The upper todo says what the correct solution is here. Please change the if statement to `if value is not None` and remove your code and also remove the TODO comment since this PR is fixing it.\r\n","created_at":"2016-09-05T16:09:21Z","updated_at":"2016-09-05T16:09:21Z","html_url":"https://github.com/google/ggrc-core/pull/4352#discussion_r77540658","pull_request_url":"https://api.github.com/repos/google/ggrc-core/pulls/4352","_links":{"self":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/comments/77540658"},"html":{"href":"https://github.com/google/ggrc-core/pull/4352#discussion_r77540658"},"pull_request":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/4352"}}},"pull_request":{"url":"https://api.github.com/repos/google/ggrc-core/pulls/4352","id":84017106,"html_url":"https://github.com/google/ggrc-core/pull/4352","diff_url":"https://github.com/google/ggrc-core/pull/4352.diff","patch_url":"https://github.com/google/ggrc-core/pull/4352.patch","issue_url":"https://api.github.com/repos/google/ggrc-core/issues/4352","number":4352,"state":"open","locked":false,"title":"ISSUE-1.339Make the list of values for Dropdown CAs mandatory","user":{"login":"plamut","id":1235663,"avatar_url":"https://avatars.githubusercontent.com/u/1235663?v=3","gravatar_id":"","url":"https://api.github.com/users/plamut","html_url":"https://github.com/plamut","followers_url":"https://api.github.com/users/plamut/followers","following_url":"https://api.github.com/users/plamut/following{/other_user}","gists_url":"https://api.github.com/users/plamut/gists{/gist_id}","starred_url":"https://api.github.com/users/plamut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plamut/subscriptions","organizations_url":"https://api.github.com/users/plamut/orgs","repos_url":"https://api.github.com/users/plamut/repos","events_url":"https://api.github.com/users/plamut/events{/privacy}","received_events_url":"https://api.github.com/users/plamut/received_events","type":"User","site_admin":false},"body":"_(section 2, issue 1.339 - P2)_\r\n\r\nThis PR prevents creating a Dropdown custom attribute without specifying at least one possible value to choose from.\r\n\r\n**Steps to reproduce:**\r\n- Open Custom Attribute tab at Admin Dashboard page\r\n- Open Any attribute section and click Add Attribute button\r\n- Fill Attribute title and select attribute type as Dropdown\r\n- Leave possible values empty or fill spaces and click Save & Close button\r\n\r\n**Actual Result:**\r\nAttribute was saved\r\n\r\n**Expected Result:**\r\nfield with possible values should have mandatory mark and Save & Close button should be disabled until valid values will be provided into possible values field","created_at":"2016-09-05T15:24:36Z","updated_at":"2016-09-05T16:09:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"082dc69b0c6cf6a1d6ed050d8b660d44dce87216","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/google/ggrc-core/milestones/21","html_url":"https://github.com/google/ggrc-core/milestones/0.9.7-Quince","labels_url":"https://api.github.com/repos/google/ggrc-core/milestones/21/labels","id":1845906,"number":21,"title":"0.9.7-Quince","description":"","creator":{"login":"Smotko","id":513444,"avatar_url":"https://avatars.githubusercontent.com/u/513444?v=3","gravatar_id":"","url":"https://api.github.com/users/Smotko","html_url":"https://github.com/Smotko","followers_url":"https://api.github.com/users/Smotko/followers","following_url":"https://api.github.com/users/Smotko/following{/other_user}","gists_url":"https://api.github.com/users/Smotko/gists{/gist_id}","starred_url":"https://api.github.com/users/Smotko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smotko/subscriptions","organizations_url":"https://api.github.com/users/Smotko/orgs","repos_url":"https://api.github.com/users/Smotko/repos","events_url":"https://api.github.com/users/Smotko/events{/privacy}","received_events_url":"https://api.github.com/users/Smotko/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":275,"state":"open","created_at":"2016-06-23T17:56:25Z","updated_at":"2016-09-05T15:24:36Z","due_on":"2016-08-14T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/google/ggrc-core/pulls/4352/commits","review_comments_url":"https://api.github.com/repos/google/ggrc-core/pulls/4352/comments","review_comment_url":"https://api.github.com/repos/google/ggrc-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/ggrc-core/issues/4352/comments","statuses_url":"https://api.github.com/repos/google/ggrc-core/statuses/c4e6caaf44492c9f4341567b56468d088f3c0a06","head":{"label":"plamut:mandatory-ca-values","ref":"mandatory-ca-values","sha":"c4e6caaf44492c9f4341567b56468d088f3c0a06","user":{"login":"plamut","id":1235663,"avatar_url":"https://avatars.githubusercontent.com/u/1235663?v=3","gravatar_id":"","url":"https://api.github.com/users/plamut","html_url":"https://github.com/plamut","followers_url":"https://api.github.com/users/plamut/followers","following_url":"https://api.github.com/users/plamut/following{/other_user}","gists_url":"https://api.github.com/users/plamut/gists{/gist_id}","starred_url":"https://api.github.com/users/plamut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plamut/subscriptions","organizations_url":"https://api.github.com/users/plamut/orgs","repos_url":"https://api.github.com/users/plamut/repos","events_url":"https://api.github.com/users/plamut/events{/privacy}","received_events_url":"https://api.github.com/users/plamut/received_events","type":"User","site_admin":false},"repo":{"id":46784845,"name":"ggrc-core","full_name":"plamut/ggrc-core","owner":{"login":"plamut","id":1235663,"avatar_url":"https://avatars.githubusercontent.com/u/1235663?v=3","gravatar_id":"","url":"https://api.github.com/users/plamut","html_url":"https://github.com/plamut","followers_url":"https://api.github.com/users/plamut/followers","following_url":"https://api.github.com/users/plamut/following{/other_user}","gists_url":"https://api.github.com/users/plamut/gists{/gist_id}","starred_url":"https://api.github.com/users/plamut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plamut/subscriptions","organizations_url":"https://api.github.com/users/plamut/orgs","repos_url":"https://api.github.com/users/plamut/repos","events_url":"https://api.github.com/users/plamut/events{/privacy}","received_events_url":"https://api.github.com/users/plamut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/plamut/ggrc-core","description":"GGRC Core","fork":true,"url":"https://api.github.com/repos/plamut/ggrc-core","forks_url":"https://api.github.com/repos/plamut/ggrc-core/forks","keys_url":"https://api.github.com/repos/plamut/ggrc-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plamut/ggrc-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plamut/ggrc-core/teams","hooks_url":"https://api.github.com/repos/plamut/ggrc-core/hooks","issue_events_url":"https://api.github.com/repos/plamut/ggrc-core/issues/events{/number}","events_url":"https://api.github.com/repos/plamut/ggrc-core/events","assignees_url":"https://api.github.com/repos/plamut/ggrc-core/assignees{/user}","branches_url":"https://api.github.com/repos/plamut/ggrc-core/branches{/branch}","tags_url":"https://api.github.com/repos/plamut/ggrc-core/tags","blobs_url":"https://api.github.com/repos/plamut/ggrc-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plamut/ggrc-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plamut/ggrc-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/plamut/ggrc-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plamut/ggrc-core/statuses/{sha}","languages_url":"https://api.github.com/repos/plamut/ggrc-core/languages","stargazers_url":"https://api.github.com/repos/plamut/ggrc-core/stargazers","contributors_url":"https://api.github.com/repos/plamut/ggrc-core/contributors","subscribers_url":"https://api.github.com/repos/plamut/ggrc-core/subscribers","subscription_url":"https://api.github.com/repos/plamut/ggrc-core/subscription","commits_url":"https://api.github.com/repos/plamut/ggrc-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/plamut/ggrc-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/plamut/ggrc-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/plamut/ggrc-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/plamut/ggrc-core/contents/{+path}","compare_url":"https://api.github.com/repos/plamut/ggrc-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plamut/ggrc-core/merges","archive_url":"https://api.github.com/repos/plamut/ggrc-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plamut/ggrc-core/downloads","issues_url":"https://api.github.com/repos/plamut/ggrc-core/issues{/number}","pulls_url":"https://api.github.com/repos/plamut/ggrc-core/pulls{/number}","milestones_url":"https://api.github.com/repos/plamut/ggrc-core/milestones{/number}","notifications_url":"https://api.github.com/repos/plamut/ggrc-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plamut/ggrc-core/labels{/name}","releases_url":"https://api.github.com/repos/plamut/ggrc-core/releases{/id}","deployments_url":"https://api.github.com/repos/plamut/ggrc-core/deployments","created_at":"2015-11-24T10:37:33Z","updated_at":"2016-02-05T19:04:35Z","pushed_at":"2016-09-05T15:19:47Z","git_url":"git://github.com/plamut/ggrc-core.git","ssh_url":"git@github.com:plamut/ggrc-core.git","clone_url":"https://github.com/plamut/ggrc-core.git","svn_url":"https://github.com/plamut/ggrc-core","homepage":null,"size":54907,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"develop"}},"base":{"label":"google:develop","ref":"develop","sha":"513b5ddee628f5be5992be60acce75bfa9153076","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":9304637,"name":"ggrc-core","full_name":"google/ggrc-core","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/ggrc-core","description":"GGRC Core","fork":false,"url":"https://api.github.com/repos/google/ggrc-core","forks_url":"https://api.github.com/repos/google/ggrc-core/forks","keys_url":"https://api.github.com/repos/google/ggrc-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/ggrc-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/ggrc-core/teams","hooks_url":"https://api.github.com/repos/google/ggrc-core/hooks","issue_events_url":"https://api.github.com/repos/google/ggrc-core/issues/events{/number}","events_url":"https://api.github.com/repos/google/ggrc-core/events","assignees_url":"https://api.github.com/repos/google/ggrc-core/assignees{/user}","branches_url":"https://api.github.com/repos/google/ggrc-core/branches{/branch}","tags_url":"https://api.github.com/repos/google/ggrc-core/tags","blobs_url":"https://api.github.com/repos/google/ggrc-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/ggrc-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/ggrc-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/ggrc-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/ggrc-core/statuses/{sha}","languages_url":"https://api.github.com/repos/google/ggrc-core/languages","stargazers_url":"https://api.github.com/repos/google/ggrc-core/stargazers","contributors_url":"https://api.github.com/repos/google/ggrc-core/contributors","subscribers_url":"https://api.github.com/repos/google/ggrc-core/subscribers","subscription_url":"https://api.github.com/repos/google/ggrc-core/subscription","commits_url":"https://api.github.com/repos/google/ggrc-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/ggrc-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/ggrc-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/ggrc-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/ggrc-core/contents/{+path}","compare_url":"https://api.github.com/repos/google/ggrc-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/ggrc-core/merges","archive_url":"https://api.github.com/repos/google/ggrc-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/ggrc-core/downloads","issues_url":"https://api.github.com/repos/google/ggrc-core/issues{/number}","pulls_url":"https://api.github.com/repos/google/ggrc-core/pulls{/number}","milestones_url":"https://api.github.com/repos/google/ggrc-core/milestones{/number}","notifications_url":"https://api.github.com/repos/google/ggrc-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/ggrc-core/labels{/name}","releases_url":"https://api.github.com/repos/google/ggrc-core/releases{/id}","deployments_url":"https://api.github.com/repos/google/ggrc-core/deployments","created_at":"2013-04-08T19:16:28Z","updated_at":"2016-09-04T17:09:18Z","pushed_at":"2016-09-05T16:08:41Z","git_url":"git://github.com/google/ggrc-core.git","ssh_url":"git@github.com:google/ggrc-core.git","clone_url":"https://github.com/google/ggrc-core.git","svn_url":"https://github.com/google/ggrc-core","homepage":null,"size":64978,"stargazers_count":128,"watchers_count":128,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":17,"forks":96,"open_issues":17,"watchers":128,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/4352"},"html":{"href":"https://github.com/google/ggrc-core/pull/4352"},"issue":{"href":"https://api.github.com/repos/google/ggrc-core/issues/4352"},"comments":{"href":"https://api.github.com/repos/google/ggrc-core/issues/4352/comments"},"review_comments":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/4352/comments"},"review_comment":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/4352/commits"},"statuses":{"href":"https://api.github.com/repos/google/ggrc-core/statuses/c4e6caaf44492c9f4341567b56468d088f3c0a06"}}}}
{"actor":{"display_login":"zidarsk8"}}