Created
January 5, 2017 01:12
-
-
Save grantmcconnaughey/df3222f525d6fe530e01289c78522c93 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_projects(self): | |
client = Github(self.access_token) | |
owner_logins = set(org.login for org in client.get_user().get_orgs()) | |
owner_logins.add(self.username) | |
return Project.objects.filter(owner__login__in=owner_logins) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment