From a6b362e45539a75b2f60fefb8d09d1a9ce0f37ac Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 6 Feb 2019 11:02:47 -0500 Subject: [PATCH] fix a subtle bug in ansible_facts lookup filtering --- awx/main/utils/filters.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/awx/main/utils/filters.py b/awx/main/utils/filters.py index 80f197390b..8cda6f5c28 100644 --- a/awx/main/utils/filters.py +++ b/awx/main/utils/filters.py @@ -185,12 +185,13 @@ class SmartFilter(object): # appending __exact is basically a no-op, because that's # what the query means if you leave it off k = k[:-len(match)] - logger.error( - 'host_filter:{} does not support searching with {}'.format( - SmartFilter.SEARCHABLE_RELATIONSHIP, - match + else: + logger.error( + 'host_filter:{} does not support searching with {}'.format( + SmartFilter.SEARCHABLE_RELATIONSHIP, + match + ) ) - ) # Strip off leading relationship key if k.startswith(SmartFilter.SEARCHABLE_RELATIONSHIP + '__'):