mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 11:50:42 -03:30
do not observe queries when constructing them
* While parsing host_filter in the smart inventory code it was triggering sql queries. This changset avoids executing the query that is being constructed.
This commit is contained in:
parent
844b0f86b8
commit
ed78978b5f
@ -297,7 +297,11 @@ class SmartFilter(object):
|
||||
self.result = None
|
||||
i = 2
|
||||
while i < len(t[0]):
|
||||
if not self.result:
|
||||
'''
|
||||
Do NOT observe self.result. It will cause the sql query to be executed.
|
||||
We do not want that. We only want to build the query.
|
||||
'''
|
||||
if isinstance(self.result, type(None)):
|
||||
self.result = t[0][0].result
|
||||
right = t[0][i].result
|
||||
self.result = self.execute_logic(self.result, right)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user