Created
December 13, 2013 21:00
-
-
Save rustyrazorblade/7951263 to your computer and use it in GitHub Desktop.
random thought
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_teams(user_id): | |
return [x.team for x in UserTeamIndex.objects(user_id=user_id)] | |
# vs | |
def get_teams(team_id): | |
return UserTeamIndex.objects(user_id=user_id).masquerade_as(Team) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment