{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/server-tools/issues/349","repository_url":"https://api.github.com/repos/OCA/server-tools","labels_url":"https://api.github.com/repos/OCA/server-tools/issues/349/labels{/name}","comments_url":"https://api.github.com/repos/OCA/server-tools/issues/349/comments","events_url":"https://api.github.com/repos/OCA/server-tools/issues/349/events","html_url":"https://github.com/OCA/server-tools/pull/349","id":131036031,"number":349,"title":"Fix comparator equals when value is returned as a list.","user":{"login":"clopez","id":221181,"avatar_url":"https://avatars.githubusercontent.com/u/221181?v=3","gravatar_id":"","url":"https://api.github.com/users/clopez","html_url":"https://github.com/clopez","followers_url":"https://api.github.com/users/clopez/followers","following_url":"https://api.github.com/users/clopez/following{/other_user}","gists_url":"https://api.github.com/users/clopez/gists{/gist_id}","starred_url":"https://api.github.com/users/clopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clopez/subscriptions","organizations_url":"https://api.github.com/users/clopez/orgs","repos_url":"https://api.github.com/users/clopez/repos","events_url":"https://api.github.com/users/clopez/events{/privacy}","received_events_url":"https://api.github.com/users/clopez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OCA/server-tools/labels/8.0","name":"8.0","color":"000000"},{"url":"https://api.github.com/repos/OCA/server-tools/labels/CLA%20Pending","name":"CLA Pending","color":"C1FD21"},{"url":"https://api.github.com/repos/OCA/server-tools/labels/needs%20review","name":"needs review","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/OCA/server-tools/milestones/3","html_url":"https://github.com/OCA/server-tools/milestones/8.0","labels_url":"https://api.github.com/repos/OCA/server-tools/milestones/3/labels","id":983662,"number":3,"title":"8.0","description":"","creator":{"login":"max3903","id":939952,"avatar_url":"https://avatars.githubusercontent.com/u/939952?v=3","gravatar_id":"","url":"https://api.github.com/users/max3903","html_url":"https://github.com/max3903","followers_url":"https://api.github.com/users/max3903/followers","following_url":"https://api.github.com/users/max3903/following{/other_user}","gists_url":"https://api.github.com/users/max3903/gists{/gist_id}","starred_url":"https://api.github.com/users/max3903/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max3903/subscriptions","organizations_url":"https://api.github.com/users/max3903/orgs","repos_url":"https://api.github.com/users/max3903/repos","events_url":"https://api.github.com/users/max3903/events{/privacy}","received_events_url":"https://api.github.com/users/max3903/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":40,"state":"open","created_at":"2015-02-17T21:52:00Z","updated_at":"2016-02-03T14:12:52Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-02-03T14:06:31Z","updated_at":"2016-02-03T14:47:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OCA/server-tools/pulls/349","html_url":"https://github.com/OCA/server-tools/pull/349","diff_url":"https://github.com/OCA/server-tools/pull/349.diff","patch_url":"https://github.com/OCA/server-tools/pull/349.patch"},"body":" * At least with an OpenLDAP server, the values returned are always lists even when there is only one value. For example:\r\n```\r\n\t{'cn': ['Carlos Lopez'],\r\n\t 'employeeType': ['employee'],\r\n\t 'givenName': ['Carlos'],\r\n\t 'loginShell': ['/bin/bash'],\r\n\t }\r\n```\r\n * Therefore, using the operator 'equals' for 'employeeType' == 'employee' will fail because the value is inside a list.\r\n\r\n * This patch checks if the value returned is a list and then picks the first field to do the comparision. If the value returned is not a list then it behaves as before."},"comment":{"url":"https://api.github.com/repos/OCA/server-tools/issues/comments/179272712","html_url":"https://github.com/OCA/server-tools/pull/349#issuecomment-179272712","issue_url":"https://api.github.com/repos/OCA/server-tools/issues/349","id":179272712,"user":{"login":"clopez","id":221181,"avatar_url":"https://avatars.githubusercontent.com/u/221181?v=3","gravatar_id":"","url":"https://api.github.com/users/clopez","html_url":"https://github.com/clopez","followers_url":"https://api.github.com/users/clopez/followers","following_url":"https://api.github.com/users/clopez/following{/other_user}","gists_url":"https://api.github.com/users/clopez/gists{/gist_id}","starred_url":"https://api.github.com/users/clopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clopez/subscriptions","organizations_url":"https://api.github.com/users/clopez/orgs","repos_url":"https://api.github.com/users/clopez/repos","events_url":"https://api.github.com/users/clopez/events{/privacy}","received_events_url":"https://api.github.com/users/clopez/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T14:47:08Z","updated_at":"2016-02-03T14:47:08Z","body":"and fixed a typo on the comparasion.\r\n\r\nWhat is the CLA?"}}