Fix rating search test

This commit is contained in:
JonnyWong16 2021-05-23 21:08:09 -07:00
parent 44d0a13254
commit 598a6654ba

View file

@ -572,7 +572,11 @@ def _test_library_search(library, obj):
operators += [andOp]
for operator in operators:
if fieldAttr == "unmatched" and operator.key == "!=" or fieldAttr == "userRating":
if (
fieldAttr == "unmatched" and operator.key == "!="
or fieldAttr in {"audienceRating", "rating"} and operator.key in {"=", "!="}
or fieldAttr == "userRating"
):
continue
value = getattr(obj, fieldAttr, None)