Skip to content

Commit

Permalink
fix for build tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FabriciaDinizRH committed Jan 14, 2025
1 parent 558bb00 commit 7e16989
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/filtering/db_custom_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
# The list of comparators can be seen in POSTGRES_COMPARATOR_LOOKUP
class OsFilter:
def __init__(self, name="", comparator="", version=None):
os_names = get_valid_os_names()

try:
if name and name.lower() not in (os_names := [name.lower() for name in get_valid_os_names()]):
if name and name.lower() not in [name.lower() for name in os_names]:
raise ValidationException(f"operating_system filter only supports these OS names: {os_names}.")

if version is None:
Expand Down

0 comments on commit 7e16989

Please sign in to comment.