Created
August 20, 2013 19:20
-
-
Save fredrikbonander/6285962 to your computer and use it in GitHub Desktop.
Fetch all Issue by assingment
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
## First fetch all assingments | |
qp = QueryParser({'assigned_to': [('=', account_id)]}) | |
assignments = IssueAssignFactory.fetch(filters=qp.filters).resolve() # Do later, just for show | |
## Make new IssueAssignFactory.fetch that only fetch keys | |
# Alt 1 | |
issues = ndb.get_multi([assignment.key().parent() for assignment in assignments]) | |
# Alt 2, bad idea i think | |
qp = QueryParser({'key': [('=', [assignment.key().parent() for assignment in assignments])]}) | |
issues = IssueFactory().fetch(filters=qp.filters).resolve() # Do later, just for show |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment