Repository: dmwm/wmcore
Issue: Internal Server Error in wmstatsserver filtered requests 

Just found it in cmsweb-testbed with this query:
https://cmsweb-testbed.cern.ch/wmstatsserver/data/filtered_requests?IncludeParents=True&mask=Campaign

which according to the reqmon logs, this is the traceback:
```
[03/Dec/2018:09:50:12] vocms0132.cern.ch 127.0.0.1 "GET /wmstatsserver/data/info HTTP/1.1" 200 OK [data: 343 in 40 out 544 us ] [auth: OK "" "" ] [ref: "" "ServerMonitor/2.0" ]
[03/Dec/2018:09:50:41]  SERVER REST ERROR WMCore.REST.Error.ExecutionError 81f89bb4b98552c97eb4f9c87abcda3b (Execution error)
[03/Dec/2018:09:50:41]    Traceback (most recent call last):
[03/Dec/2018:09:50:41]      File "/data/srv/beHG1812c/sw/slc7_amd64_gcc630/cms/reqmon/1.1.19.pre3/lib/python2.7/site-packages/WMCore/REST/Format.py", line 289, in stream_chunked
[03/Dec/2018:09:50:41]        for obj in stream:
[03/Dec/2018:09:50:41]      File "/data/srv/beHG1812c/sw/slc7_amd64_gcc630/cms/reqmon/1.1.19.pre3/lib/python2.7/site-packages/WMCore/REST/Server.py", line 2367, in rows
[03/Dec/2018:09:50:41]        for row in cursor:
[03/Dec/2018:09:50:41]      File "/data/srv/beHG1812c/sw/slc7_amd64_gcc630/cms/reqmon/1.1.19.pre3/lib/python2.7/site-packages/WMCore/WMStats/DataStructs/DataCache.py", line 68, in filterDataByRequest
[03/Dec/2018:09:50:41]        if reqInfo.andFilterCheck(filterDict):
[03/Dec/2018:09:50:41]      File "/data/srv/beHG1812c/sw/slc7_amd64_gcc630/cms/reqmon/1.1.19.pre3/lib/python2.7/site-packages/WMCore/ReqMgr/DataStructs/Request.py", line 254, in andFilterCheck
[03/Dec/2018:09:50:41]        if not set(reqValue).intersection(set(value)):
[03/Dec/2018:09:50:41]    TypeError: 'bool' object is not iterable
[03/Dec/2018:09:50:41]  SERVER HTTP ERROR cherrypy._cperror.HTTPError 6cca9ca617c0246bfd21d329469b9e5a ((500, 'Execution error'))
[03/Dec/2018:09:50:41]    Traceback (most recent call last):
[03/Dec/2018:09:50:41]      File "/data/srv/beHG1812c/sw/slc7_amd64_gcc630/cms/reqmon/1.1.19.pre3/lib/python2.7/site-packages/WMCore/REST/Server.py", line 711, in default
[03/Dec/2018:09:50:41]        return self._call(RESTArgs(list(args), kwargs))
[03/Dec/2018:09:50:41]      File "/data/srv/beHG1812c/sw/slc7_amd64_gcc630/cms/reqmon/1.1.19.pre3/lib/python2.7/site-packages/WMCore/REST/Server.py", line 822, in _call
[03/Dec/2018:09:50:41]        return stream_maybe_etag(apiobj.get('etag_limit', self.etag_limit), etagger, reply)
[03/Dec/2018:09:50:41]      File "/data/srv/beHG1812c/sw/slc7_amd64_gcc630/cms/reqmon/1.1.19.pre3/lib/python2.7/site-packages/WMCore/REST/Format.py", line 590, in stream_maybe_etag
[03/Dec/2018:09:50:41]        raise cherrypy.HTTPError(int(err), message)
[03/Dec/2018:09:50:41]    HTTPError: (500, 'Execution error')
[03/Dec/2018:09:50:41] vocms0132.cern.ch 194.12.153.215 "GET /wmstatsserver/data/filtered_requests?IncludeParents=True&mask=IncludeParents HTTP/1.1" 500 Internal Server Error [data: 5110 in 746 out 1330866 us ] [auth: OK "/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=amaltaro/CN=718748/CN=Alan Malta Rodrigues" "" ] [ref: "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36" ]
```

Changed files:
src/python/WMCore/ReqMgr/DataStructs/Request.py

diff --git a/src/python/WMCore/ReqMgr/DataStructs/Request.py b/src/python/WMCore/ReqMgr/DataStructs/Request.py
index 343c59d62..6827322f5 100644
--- a/src/python/WMCore/ReqMgr/DataStructs/Request.py
+++ b/src/python/WMCore/ReqMgr/DataStructs/Request.py
@@ -243,20 +243,16 @@ class RequestInfo(object):
                 value = False
             elif value in ["true", "True", "TRUE"]:
                 value = True
-            elif not isinstance(value, list):
+
+            # Now make value list if value is not in list form including bool value
+            if not isinstance(value, list):
                 value = [value]
 
             reqValue = self.get(key)
             if reqValue is not None:
-                if isinstance(reqValue, list) and isinstance(value, list):
+                if isinstance(reqValue, list):
                     if not set(reqValue).intersection(set(value)):
                         return False
-                elif isinstance(reqValue, list):
-                    if value not in reqValue:
-                        return False
-                elif isinstance(reqValue, bool):
-                    if reqValue is not value:
-                        return False
                 elif reqValue not in value:
                     return False
             else: