Skip to content

Commit

Permalink
optimize a slow query in inventory script generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpetrello committed Aug 14, 2019
1 parent 7374732 commit 98e7ae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion awx/main/models/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def get_script_data(self, hostvars=False, towervars=False, show_all=False, slice

# Now use in-memory maps to build up group info.
all_group_names = []
for group in self.groups.only('name', 'id', 'variables'):
for group in self.groups.only('name', 'id', 'variables', 'inventory_id'):
group_info = dict()
if group.id in group_hosts_map:
group_info['hosts'] = group_hosts_map[group.id]
Expand Down

0 comments on commit 98e7ae5

Please sign in to comment.