Skip to content

Commit

Permalink
Join Query table so we don't have to execute a separate sql statement…
Browse files Browse the repository at this point in the history
… to get query info
  • Loading branch information
mwielgoszewski committed Aug 31, 2017
1 parent 5eb9455 commit f3bbdee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doorman/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def assemble_schedule(node):

def assemble_packs(node):
packs = {}
for pack in node.packs.join(querypacks):
for pack in node.packs.join(querypacks).join(Query) \
.options(db.contains_eager(Pack.queries)).all():
packs[pack.name] = pack.to_dict()
return packs

Expand Down

0 comments on commit f3bbdee

Please sign in to comment.