{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/9714","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/9714/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/9714/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/9714/events","html_url":"https://github.com/edx/edx-platform/pull/9714","id":105909574,"number":9714,"title":"Prevent over-expansion of team memberships.","user":{"login":"peter-fogg","id":1819831,"avatar_url":"https://avatars.githubusercontent.com/u/1819831?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-fogg","html_url":"https://github.com/peter-fogg","followers_url":"https://api.github.com/users/peter-fogg/followers","following_url":"https://api.github.com/users/peter-fogg/following{/other_user}","gists_url":"https://api.github.com/users/peter-fogg/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-fogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-fogg/subscriptions","organizations_url":"https://api.github.com/users/peter-fogg/orgs","repos_url":"https://api.github.com/users/peter-fogg/repos","events_url":"https://api.github.com/users/peter-fogg/events{/privacy}","received_events_url":"https://api.github.com/users/peter-fogg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-10T22:14:55Z","updated_at":"2015-09-10T23:57:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/9714","html_url":"https://github.com/edx/edx-platform/pull/9714","diff_url":"https://github.com/edx/edx-platform/pull/9714.diff","patch_url":"https://github.com/edx/edx-platform/pull/9714.patch"},"body":"## [TNL-3202](https://openedx.atlassian.net/browse/TNL-3202)\r\n\r\nFixes team memberships have their users expanded both in the `user` field, and recursively in the `team` field. This prevents the serializer from making excessive database queries.\r\n\r\nNote that this does require some front end changes, since we're passing different information along now. This led me to the messy pile that is `team_card.js`, which for some reason tries to use (bad) ad-hoc polymorphism over both team collections and team membership collections. I've been working for a while to refactor it, but I haven't gotten anywhere yet. Since this should really be in by tomorrow morning I've just hacked around the messiness. I do plan on getting back to this though; I intend to have a refactored version in next week's release.\r\n\r\n### Testing\r\n- [x] Unit, integration, acceptance tests as appropriate\r\n\r\n### Reviewers\r\nIf you've been tagged for review, please check your corresponding box once you've given the :+1:.\r\n- [ ] Code review: @dan-f \r\n- [ ] Code review: @andy-armstrong \r\n\r\nFYI @bderusha \r\n\r\n### Post-review\r\n- [ ] Squash commits"},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/139414089","html_url":"https://github.com/edx/edx-platform/pull/9714#issuecomment-139414089","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/9714","id":139414089,"user":{"login":"andy-armstrong","id":5985072,"avatar_url":"https://avatars.githubusercontent.com/u/5985072?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-armstrong","html_url":"https://github.com/andy-armstrong","followers_url":"https://api.github.com/users/andy-armstrong/followers","following_url":"https://api.github.com/users/andy-armstrong/following{/other_user}","gists_url":"https://api.github.com/users/andy-armstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-armstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-armstrong/subscriptions","organizations_url":"https://api.github.com/users/andy-armstrong/orgs","repos_url":"https://api.github.com/users/andy-armstrong/repos","events_url":"https://api.github.com/users/andy-armstrong/events{/privacy}","received_events_url":"https://api.github.com/users/andy-armstrong/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T23:57:04Z","updated_at":"2015-09-10T23:57:04Z","body":"This is a nice approach to the problem, and I agree with the choice of keeping the team_card fix simple. Unfortunately there are a couple of Python and JavaScript unit test failures that seem to be caused by your changes. :+1: with those fixed."}}