diff --git a/sal/version.plist b/sal/version.plist index 635b025b..f10f6377 100644 --- a/sal/version.plist +++ b/sal/version.plist @@ -3,6 +3,6 @@ version - 3.2.4.976 + 3.2.5.984 diff --git a/search/views.py b/search/views.py index a0cd680b..6450b18f 100644 --- a/search/views.py +++ b/search/views.py @@ -123,6 +123,10 @@ def search_machines(search_id, machines, full=False): querystring = { '%s%s' % (search_row.search_field, operator): search_row.search_term } + if operator != '': + q_object = Q(**querystring) + else: + q_object = ~Q(**querystring) elif search_row.search_models == 'Facter': model = Fact prepend = 'facts__' @@ -130,6 +134,10 @@ def search_machines(search_id, machines, full=False): 'facts__fact_name': search_row.search_field, 'facts__fact_data%s' % (operator): search_row.search_term } + if operator != '': + q_object = Q(**querystring) + else: + q_object = ~Q(**querystring) elif search_row.search_models == 'Condition': model = Condition @@ -137,6 +145,10 @@ def search_machines(search_id, machines, full=False): 'conditions__condition_name': search_row.search_field, 'conditions__condition_data%s' % (operator): search_row.search_term } + if operator != '': + q_object = Q(**querystring) + else: + q_object = ~Q(**querystring) elif search_row.search_models == 'Application Inventory': @@ -149,12 +161,11 @@ def search_machines(search_id, machines, full=False): 'inventoryitem__application__%s%s' % (search_field, operator): search_row.search_term } - if model != None: if operator != '': q_object = Q(**querystring) - else: q_object = ~Q(**querystring) + elif search_row.search_models == 'External Script': # It must be an exernal thingie if we're here model = PluginScriptRow @@ -210,6 +221,7 @@ def search_machines(search_id, machines, full=False): queries = row_queries search_group_counter = search_group_counter + 1 + print queries if full == True: machines = machines.filter(queries).distinct() diff --git a/set_build_no.sh b/set_build_no.sh index 19da7817..898b53a3 100755 --- a/set_build_no.sh +++ b/set_build_no.sh @@ -1,6 +1,6 @@ #!/bin/bash -current_version="3.2.4" +current_version="3.2.5" pushd `dirname $0` > /dev/null SCRIPTPATH=`pwd`