{"action":"opened","issue":{"url":"https://api.github.com/repos/RallyTools/RallyRestToolkitForPython/issues/57","labels_url":"https://api.github.com/repos/RallyTools/RallyRestToolkitForPython/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/RallyTools/RallyRestToolkitForPython/issues/57/comments","events_url":"https://api.github.com/repos/RallyTools/RallyRestToolkitForPython/issues/57/events","html_url":"https://github.com/RallyTools/RallyRestToolkitForPython/issues/57","id":75166727,"number":57,"title":"Attribute error User instance has no attribute 'UserProfile' in function getAllUsers","user":{"login":"jfthuong","id":1401809,"avatar_url":"https://avatars.githubusercontent.com/u/1401809?v=3","gravatar_id":"","url":"https://api.github.com/users/jfthuong","html_url":"https://github.com/jfthuong","followers_url":"https://api.github.com/users/jfthuong/followers","following_url":"https://api.github.com/users/jfthuong/following{/other_user}","gists_url":"https://api.github.com/users/jfthuong/gists{/gist_id}","starred_url":"https://api.github.com/users/jfthuong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfthuong/subscriptions","organizations_url":"https://api.github.com/users/jfthuong/orgs","repos_url":"https://api.github.com/users/jfthuong/repos","events_url":"https://api.github.com/users/jfthuong/events{/privacy}","received_events_url":"https://api.github.com/users/jfthuong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-11T10:16:28Z","updated_at":"2015-05-11T10:16:28Z","closed_at":null,"body":"The following block of code returns an error when the user has no attribute 'UserProfile'.\r\n\r\nrestapi.py, lines 571 to 575:\r\n```python\r\n            # get any matching user profiles (aka mups), there really should only be 1 matching...\r\n            mups = [prof for prof in profiles \r\n                          if hasattr(user, 'UserProfile') and prof._ref == user.UserProfile._ref] \r\n            if not mups:\r\n                problem = \"unable to find a matching UserProfile record for User: %s  UserProfile: %s\"\r\n                warning(\"%s\" % (problem % (user.DisplayName, user.UserProfile)))\r\n                continue\r\n```\r\n\r\nIf the user has no attribute, 'UserProfile', the program enter in the condition \"if no mups\"  and the line which was supposed to raise a warning, raises an error instead."}}