Skip to content

Commit b49522e

Browse files
committed
changes from bot review
1 parent 7f5130c commit b49522e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

backend/handler/database/roms_handler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ def _filter_by_genres(
374374
match_all: bool = False,
375375
match_none: bool = False,
376376
) -> Query:
377-
print("GENRES", match_all, match_none)
378377
op = json_array_contains_all if match_all else json_array_contains_any
379378
condition = op(RomMetadata.genres, values, session=session)
380379
return query.filter(~condition) if match_none else query.filter(condition)
@@ -488,7 +487,10 @@ def _filter_by_player_counts(
488487
match_all: bool = False,
489488
match_none: bool = False,
490489
) -> Query:
491-
return query.filter(RomMetadata.player_count.in_(values))
490+
condition = RomMetadata.player_count.in_(values)
491+
if match_none:
492+
return query.filter(not_(condition))
493+
return query.filter(condition)
492494

493495
@begin_session
494496
def filter_roms(

0 commit comments

Comments
 (0)